diff options
-rw-r--r-- | meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf | 7 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service | 10 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/ptpd/ptpd_2.3.1-rc2.bb | 21 |
3 files changed, 36 insertions, 2 deletions
diff --git a/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf b/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf new file mode 100644 index 0000000000..ddd571036f --- /dev/null +++ b/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.conf | |||
@@ -0,0 +1,7 @@ | |||
1 | # | ||
2 | # PTPD Configuration | ||
3 | # | ||
4 | # See man ptpd2 for arguments. | ||
5 | # | ||
6 | # Example arguments | ||
7 | PTPDARGS="-d 1 -i eth0" | ||
diff --git a/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service b/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service new file mode 100644 index 0000000000..f84799eb5f --- /dev/null +++ b/meta-networking/recipes-daemons/ptpd/ptpd/ptpd.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=ptpd time precision daemon | ||
3 | |||
4 | [Service] | ||
5 | Type=forking | ||
6 | EnvironmentFile=-@SYSCONFDIR@/default/ptpd | ||
7 | ExecStart=@BINDIR@/ptpd2 $PTPDARGS | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1-rc2.bb b/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1-rc2.bb index 274ea331b4..50cdc7f2d8 100644 --- a/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1-rc2.bb +++ b/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1-rc2.bb | |||
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://README;md5=2452033fe374283f29579898663b1aa8" | |||
10 | 10 | ||
11 | DEPENDS = "libpcap" | 11 | DEPENDS = "libpcap" |
12 | 12 | ||
13 | inherit autotools | 13 | inherit autotools systemd |
14 | 14 | ||
15 | # return something like '1.2.3' or '1.2.3/rc1' | 15 | # return something like '1.2.3' or '1.2.3/rc1' |
16 | # | 16 | # |
@@ -22,7 +22,9 @@ def get_sub(d): | |||
22 | return parts[0] | 22 | return parts[0] |
23 | 23 | ||
24 | SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptpd-${PV}.tar.gz \ | 24 | SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptpd-${PV}.tar.gz \ |
25 | file://ptpd-add-dpaa-etsec-support.patch \ | 25 | file://ptpd-add-dpaa-etsec-support.patch \ |
26 | file://ptpd.service \ | ||
27 | file://ptpd.conf \ | ||
26 | " | 28 | " |
27 | 29 | ||
28 | SRC_URI[md5sum] = "1ef2f1f2825080a865bbce0eb61246d4" | 30 | SRC_URI[md5sum] = "1ef2f1f2825080a865bbce0eb61246d4" |
@@ -38,4 +40,19 @@ do_install() { | |||
38 | install -d ${D}${bindir} ${D}${mandir}/man8 | 40 | install -d ${D}${bindir} ${D}${mandir}/man8 |
39 | install -m 0755 ${B}/src/ptpd2 ${D}${bindir} | 41 | install -m 0755 ${B}/src/ptpd2 ${D}${bindir} |
40 | install -m 0644 ${B}/src/ptpd2.8 ${D}${mandir}/man8 | 42 | install -m 0644 ${B}/src/ptpd2.8 ${D}${mandir}/man8 |
43 | |||
44 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
45 | install -d ${D}${systemd_unitdir}/system | ||
46 | install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system | ||
47 | |||
48 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service | ||
49 | sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service | ||
50 | |||
51 | install -d ${D}${sysconfdir}/default/ | ||
52 | install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd | ||
53 | fi | ||
41 | } | 54 | } |
55 | |||
56 | SYSTEMD_PACKAGES = "${PN}" | ||
57 | SYSTEMD_SERVICE_${PN} = "ptpd.service" | ||
58 | SYSTEMD_AUTO_ENABLE = "disable" | ||