diff options
author | Chunrong Guo <chunrong.guo@nxp.com> | 2018-02-07 12:01:47 +0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-02-21 08:56:06 -0300 |
commit | 065e16fc26ccad854112d90b896c72d2a2c3d9e2 (patch) | |
tree | 2de3a068293eed918fa21adce27baf90de20852d /recipes-daemons/ptpd | |
parent | 32c704ba38537c9dcc48a7aff17061d1220eb3cf (diff) | |
download | meta-freescale-065e16fc26ccad854112d90b896c72d2a2c3d9e2.tar.gz |
ptpd-qoriq: add recipes
*update to ec34cdd
ec34cdd - ptpd: support linux PHC APIs and HW timestamp
fb75441 - Initial commit for ptpd 2.3.1
Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-daemons/ptpd')
-rw-r--r-- | recipes-daemons/ptpd/ptpd-qoriq.bb | 56 | ||||
-rw-r--r-- | recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch | 35 |
2 files changed, 91 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" | ||
diff --git a/recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch b/recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch new file mode 100644 index 00000000..e4578dda --- /dev/null +++ b/recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 4c850b92a1cf8cfa19677c66bcde2edfab1a4490 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | ||
3 | Date: Tue, 24 Feb 2015 23:02:14 -0500 | ||
4 | Subject: [PATCH] ptpd: use pkgconfig | ||
5 | |||
6 | Yocto uses pkg-config for libpcap, rather than pcap-config, so use that | ||
7 | instead as the source for libs and cflags. | ||
8 | |||
9 | Upstream-status: Inappropriate [ embedded specific ] | ||
10 | |||
11 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | ||
12 | --- | ||
13 | configure.ac | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index dc9541f..288f547 100644 | ||
18 | --- a/configure.ac | ||
19 | +++ b/configure.ac | ||
20 | @@ -112,10 +112,10 @@ case "$try_pcap" in | ||
21 | yes) | ||
22 | case "$PATH_PCAP_CONFIG" in | ||
23 | /*) | ||
24 | - PCAP_LIBS=`$PATH_PCAP_CONFIG --libs` | ||
25 | + PCAP_LIBS=`$PATH_PCAP_CONFIG --libs libpcap` | ||
26 | AC_SUBST([PCAP_LIBS]) | ||
27 | # Separate CPPFLAGS and CFLAGS | ||
28 | - foo=`$PATH_PCAP_CONFIG --cflags` | ||
29 | + foo=`$PATH_PCAP_CONFIG --cflags libpcap` | ||
30 | PCAP_CPPFLAGS= | ||
31 | PCAP_CFLAGS= | ||
32 | for i in $foo; do | ||
33 | -- | ||
34 | 1.9.1 | ||
35 | |||