opera hbbtv.
[vuplus_openembedded] / recipes / openntpd / openntpd_3.9p1.bb
1 DESCRIPTION = "OpenNTPD is a FREE, easy to use implementation of the \
2 Network Time Protocol."
3 HOMEPAGE = "http://www.openntpd.org/"
4 SECTION = "console/network"
5 LICENSE = "BSD"
6 DEPENDS += "openssl tzdata"
7 PR = "r1"
8
9 SRC_URI = "http://www.zip.com.au/~dtucker/openntpd/release/${P}.tar.gz \
10            file://adjtimex-${PV}.patch;patch=1 \
11            file://init"
12
13 S = "${WORKDIR}/openntpd-${PV}"
14
15 inherit autotools update-rc.d
16
17 EXTRA_OECONF += "CFLAGS=-DUSE_ADJTIMEX --disable-strip --prefix=/usr \
18                 --sysconfdir=/etc  --with-privsep-path=/${localstatedir}/shared/empty \
19                 --with-privsep-user=ntpd \
20                 --with-builtin-arc4random \
21                 --without-ssl-dir"
22
23 do_install_prepend() {
24         install -d ${D}${sysconfdir}/init.d
25 }
26 do_install_append() {
27         install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/openntpd
28 }
29
30 pkg_postinst () {
31         [ ! -d ${localstatedir}/shared ] && mkdir -p ${localstatedir}/shared
32         grep ntpd ${sysconfdir}/passwd || adduser --disabled-password --home=${localstatedir}/shared/empty --ingroup nogroup ntpd
33         chown root:root ${localstatedir}/shared/empty
34 }
35
36 pkg_postrm () {
37         grep ntpd ${sysconfdir}/passwd && deluser ntpd
38 }
39
40 INITSCRIPT_NAME = "openntpd"
41
42 INITSCRIPT_PARAMS = "defaults"