ptpd_2.3.1.bb 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. DEPENDS = "libpcap"
  11. inherit autotools systemd
  12. # return something like '1.2.3' or '1.2.3/rc1'
  13. #
  14. def get_sub(d):
  15. parts = d.getVar('PV').split('-')
  16. try:
  17. return parts[0] + '/' + parts[1]
  18. except:
  19. return parts[0]
  20. SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptpd-${PV}.tar.gz \
  21. file://ptpd-use-pkgconfig.patch \
  22. file://ptpd.service \
  23. file://ptpd.conf \
  24. "
  25. SRC_URI[md5sum] = "253bab7ab51d969616ea811be1f132f3"
  26. SRC_URI[sha256sum] = "0dbf54dd2c178bd9fe62481d2c37513ee36636d8bf137cfdad96891490cdbf93"
  27. S = "${WORKDIR}/ptpd-${PV}"
  28. EXTRA_OEMAKE = ""
  29. EXTRA_OECONF += "--disable-snmp --with-pcap-config=pkg-config"
  30. do_install() {
  31. install -d ${D}${bindir} ${D}${mandir}/man8
  32. install -m 0755 ${B}/src/ptpd2 ${D}${bindir}
  33. install -m 0644 ${B}/src/ptpd2.8 ${D}${mandir}/man8
  34. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  35. install -d ${D}${systemd_unitdir}/system
  36. install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system
  37. sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service
  38. sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service
  39. install -d ${D}${sysconfdir}/default/
  40. install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd
  41. fi
  42. }
  43. SYSTEMD_PACKAGES = "${PN}"
  44. SYSTEMD_SERVICE_${PN} = "ptpd.service"
  45. SYSTEMD_AUTO_ENABLE = "disable"