diff options
Diffstat (limited to 'meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb')
-rw-r--r-- | meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb new file mode 100644 index 0000000000..421113cdfc --- /dev/null +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb | |||
@@ -0,0 +1,54 @@ | |||
1 | SUMMARY = "linuxptp package for linux" | ||
2 | DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 \ | ||
3 | for Linux" | ||
4 | HOMEPAGE = "http://linuxptp.sourceforge.net/" | ||
5 | LICENSE = "GPL-2.0-only" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
7 | |||
8 | SRC_URI = "https://downloads.nwtime.org/linuxptp/linuxptp-${PV}.tgz \ | ||
9 | file://systemd/phc2sys@.service.in \ | ||
10 | file://systemd/ptp4l@.service.in \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[sha256sum] = "61757bc0a58d789b8fcbdddf56c88a0230597184a70dcb2ac05b4c6b619f7d5c" | ||
14 | |||
15 | inherit systemd | ||
16 | |||
17 | EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}' \ | ||
18 | sbindir='${sbindir}'" | ||
19 | |||
20 | export KBUILD_OUTPUT = "${RECIPE_SYSROOT}" | ||
21 | |||
22 | LINUXPTP_SYSTEMD_SERVICES = "phc2sys@.service ptp4l@.service" | ||
23 | |||
24 | do_install() { | ||
25 | oe_runmake install DESTDIR=${D} | ||
26 | |||
27 | # Install example configs from source tree | ||
28 | install -d ${D}${docdir}/${PN} | ||
29 | cp -R --no-dereference --preserve=mode,links ${S}/configs \ | ||
30 | ${D}${docdir}/${PN} | ||
31 | |||
32 | # Install default configuration files | ||
33 | install -d ${D}/${sysconfdir}/linuxptp/ | ||
34 | install -m 644 ${S}/configs/default.cfg \ | ||
35 | ${D}${sysconfdir}/linuxptp/ptp4l.conf | ||
36 | |||
37 | # Install systemd services | ||
38 | install -d ${D}/${systemd_unitdir}/system/ | ||
39 | for service in ${LINUXPTP_SYSTEMD_SERVICES}; do | ||
40 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
41 | ${UNPACKDIR}/systemd/$service.in | ||
42 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
43 | ${UNPACKDIR}/systemd/$service.in | ||
44 | install -m 644 ${UNPACKDIR}/systemd/$service.in \ | ||
45 | ${D}/${systemd_unitdir}/system/$service | ||
46 | done | ||
47 | } | ||
48 | |||
49 | SYSTEMD_SERVICE:${PN} = "${LINUXPTP_SYSTEMD_SERVICES}" | ||
50 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" | ||
51 | |||
52 | PACKAGES =+ "${PN}-configs" | ||
53 | |||
54 | FILES:${PN}-configs += "${docdir}" | ||