]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/openntpd/openntpd_3.7p1.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / openntpd / openntpd_3.7p1.bb
1 DEPENDS += "openssl"
2 DESCRIPTION = "OpenNTPD is a FREE, easy to use implementation of the \
3 Network Time Protocol."
4 HOMEPAGE = "http://www.openntpd.org/"
5 LICENSE = "BSD"
6 SECTION = "console/network"
7 MAINTAINER = "Oyvind Repvik <nail@nslu2-linux.org>"
8 DEPENDS = "timezones"
9 PR="r11"
10
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 \
15            file://init"
16 S = "${WORKDIR}/openntpd-${PV}"
17
18 INITSCRIPT_NAME = "openntpd"
19 INITSCRIPT_PARAMS = "defaults"
20
21
22 inherit autotools update-rc.d
23
24 EXTRA_OECONF += "CFLAGS=-DUSE_ADJTIMEX --disable-strip --prefix=/usr \
25                 --sysconfdir=/etc  --with-privsep-path=/${localstatedir}/shared/empty \
26                 --with-privsep-user=ntpd"
27
28 do_install_prepend() {
29         install -d ${D}${sysconfdir}/init.d
30 }
31
32 do_install_append() {
33         install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/openntpd
34 }
35
36 pkg_postrm () {
37         grep ntpd ${sysconfdir}/passwd && deluser ntpd 
38 }
39
40 pkg_postinst () {
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
44 }
45