2 DESCRIPTION = "OpenNTPD is a FREE, easy to use implementation of the \
3 Network Time Protocol."
4 HOMEPAGE = "http://www.openntpd.org/"
6 SECTION = "console/network"
7 MAINTAINER = "Oyvind Repvik <nail@nslu2-linux.org>"
11 SRC_URI = "http://www.zip.com.au/~dtucker/openntpd/release/openntpd-${PV}.tar.gz \
12 file://autofoo.patch;patch=1 \
13 file://adjtimex-${PV}.patch;patch=1 \
14 file://makefile-install.patch;patch=1 \
16 S = "${WORKDIR}/openntpd-${PV}"
18 INITSCRIPT_NAME = "openntpd"
19 INITSCRIPT_PARAMS = "defaults"
22 inherit autotools update-rc.d
24 EXTRA_OECONF += "CFLAGS=-DUSE_ADJTIMEX --disable-strip --prefix=/usr \
25 --sysconfdir=/etc --with-privsep-path=/${localstatedir}/shared/empty \
26 --with-privsep-user=ntpd"
28 do_install_prepend() {
29 install -d ${D}${sysconfdir}/init.d
33 install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/openntpd
37 grep ntpd ${sysconfdir}/passwd && deluser ntpd
41 [ ! -d ${localstatedir}/shared ] && mkdir -p ${localstatedir}/shared
42 grep ntpd ${sysconfdir}/passwd || adduser --disabled-password --home=${localstatedir}/shared/empty --ingroup nogroup ntpd
43 chown root:root ${localstatedir}/shared/empty