diff options
Diffstat (limited to 'recipes-daemons/ptpd/ptpd-qoriq.bb')
-rw-r--r-- | recipes-daemons/ptpd/ptpd-qoriq.bb | 56 |
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 @@ | |||
1 | SUMMARY = "The PTP daemon (PTPd)" | ||
2 | DESCRIPTION = "The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as \ | ||
3 | defined by the relevant IEEE 1588 standard. PTP Version 1 implements IEEE-1588-2002, \ | ||
4 | and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very precise \ | ||
5 | time coordination of LAN connected computers." | ||
6 | HOMEPAGE = "http://sourceforge.net/projects/ptpd" | ||
7 | SECTION = "net" | ||
8 | LICENSE = "BSD" | ||
9 | LIC_FILES_CHKSUM = "file://README;md5=0733e1b3788ab2ebbc63bf33a020da1d" | ||
10 | |||
11 | DEPENDS = "libpcap" | ||
12 | |||
13 | PROVIDES = "ptpd" | ||
14 | |||
15 | inherit autotools pkgconfig systemd | ||
16 | |||
17 | # return something like '1.2.3' or '1.2.3/rc1' | ||
18 | # | ||
19 | def get_sub(d): | ||
20 | parts = d.getVar('PV').split('-') | ||
21 | try: | ||
22 | return parts[0] + '/' + parts[1] | ||
23 | except: | ||
24 | return parts[0] | ||
25 | |||
26 | SRC_URI = "git://github.com/qoriq-open-source/ptpd.git;nobranch=1 \ | ||
27 | file://ptpd-use-pkgconfig.patch \ | ||
28 | " | ||
29 | SRCREV = "ec34cdd10446619d036ac8d6a86b8276f0d4a81c" | ||
30 | |||
31 | S = "${WORKDIR}/git" | ||
32 | |||
33 | EXTRA_OEMAKE = "" | ||
34 | |||
35 | EXTRA_OECONF += "--disable-snmp --with-pcap-config=pkg-config" | ||
36 | |||
37 | do_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 | |||
54 | SYSTEMD_PACKAGES = "${PN}" | ||
55 | SYSTEMD_SERVICE_${PN} = "ptpd.service" | ||
56 | SYSTEMD_AUTO_ENABLE = "disable" | ||