summaryrefslogtreecommitdiffstats
path: root/recipes-daemons/ptpd/ptpd-qoriq.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-daemons/ptpd/ptpd-qoriq.bb')
-rw-r--r--recipes-daemons/ptpd/ptpd-qoriq.bb56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-daemons/ptpd/ptpd-qoriq.bb b/recipes-daemons/ptpd/ptpd-qoriq.bb
new file mode 100644
index 00000000..65f11d0d
--- /dev/null
+++ b/recipes-daemons/ptpd/ptpd-qoriq.bb
@@ -0,0 +1,56 @@
1SUMMARY = "The PTP daemon (PTPd)"
2DESCRIPTION = "The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as \
3defined by the relevant IEEE 1588 standard. PTP Version 1 implements IEEE-1588-2002, \
4and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very precise \
5time coordination of LAN connected computers."
6HOMEPAGE = "http://sourceforge.net/projects/ptpd"
7SECTION = "net"
8LICENSE = "BSD"
9LIC_FILES_CHKSUM = "file://README;md5=0733e1b3788ab2ebbc63bf33a020da1d"
10
11DEPENDS = "libpcap"
12
13PROVIDES = "ptpd"
14
15inherit autotools pkgconfig systemd
16
17# return something like '1.2.3' or '1.2.3/rc1'
18#
19def get_sub(d):
20 parts = d.getVar('PV').split('-')
21 try:
22 return parts[0] + '/' + parts[1]
23 except:
24 return parts[0]
25
26SRC_URI = "git://github.com/qoriq-open-source/ptpd.git;nobranch=1 \
27 file://ptpd-use-pkgconfig.patch \
28"
29SRCREV = "ec34cdd10446619d036ac8d6a86b8276f0d4a81c"
30
31S = "${WORKDIR}/git"
32
33EXTRA_OEMAKE = ""
34
35EXTRA_OECONF += "--disable-snmp --with-pcap-config=pkg-config"
36
37do_install() {
38 install -d ${D}${bindir} ${D}${mandir}/man8
39 install -m 0755 ${B}/src/ptpd2 ${D}${bindir}
40 install -m 0644 ${B}/src/ptpd2.8 ${D}${mandir}/man8
41
42 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
43 install -d ${D}${systemd_unitdir}/system
44 install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system
45
46 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service
47 sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service
48
49 install -d ${D}${sysconfdir}/default/
50 install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd
51 fi
52}
53
54SYSTEMD_PACKAGES = "${PN}"
55SYSTEMD_SERVICE_${PN} = "ptpd.service"
56SYSTEMD_AUTO_ENABLE = "disable"