summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb')
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb54
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 @@
1SUMMARY = "linuxptp package for linux"
2DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 \
3for Linux"
4HOMEPAGE = "http://linuxptp.sourceforge.net/"
5LICENSE = "GPL-2.0-only"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8SRC_URI = "https://downloads.nwtime.org/linuxptp/linuxptp-${PV}.tgz \
9 file://systemd/phc2sys@.service.in \
10 file://systemd/ptp4l@.service.in \
11 "
12
13SRC_URI[sha256sum] = "61757bc0a58d789b8fcbdddf56c88a0230597184a70dcb2ac05b4c6b619f7d5c"
14
15inherit systemd
16
17EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}' \
18 sbindir='${sbindir}'"
19
20export KBUILD_OUTPUT = "${RECIPE_SYSROOT}"
21
22LINUXPTP_SYSTEMD_SERVICES = "phc2sys@.service ptp4l@.service"
23
24do_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
49SYSTEMD_SERVICE:${PN} = "${LINUXPTP_SYSTEMD_SERVICES}"
50SYSTEMD_AUTO_ENABLE:${PN} = "disable"
51
52PACKAGES =+ "${PN}-configs"
53
54FILES:${PN}-configs += "${docdir}"