Merge from vendor branch TNF:
[pkgsrcv2.git] / net / ntp4 / Makefile
1 # $NetBSD: Makefile,v 1.8 1999/08/19 08:52:57 fredb Exp $
2 #
3
4 DISTNAME=       ntp-4.0.95
5 PKGNAME=        ntp-4.0.97d
6 CATEGORIES=     net
7 MASTER_SITES=   http://www.eecis.udel.edu/~ntp/ntp_spool/testing/ \
8                 http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ \
9                 ftp://ftp.udel.edu/pub/ntp/testing/ \
10                 ftp://ftp.udel.edu/pub/ntp/ntp4/
11
12 PATCH_SITES=    ${MASTER_SITES}
13 PATCHFILES=     ntp-4.0.95-4.0.96.diff.gz \
14                 ntp-4.0.96-4.0.96p1.diff.gz \
15                 ntp-4.0.96p1-4.0.97.diff.gz \
16                 ntp-4.0.97-4.0.97a.diff.gz \
17                 ntp-4.0.97a-4.0.97b.diff.gz \
18                 ntp-4.0.97b-4.0.97c.diff.gz \
19                 ntp-4.0.97c-4.0.97d.diff.gz
20 PATCH_DIST_STRIP= -p1
21
22 MAINTAINER=     fb@enteract.com
23 HOMEPAGE=       http://www.ntp.org/
24
25 BUILD_DEPENDS+= autoconf:../../devel/autoconf
26 BUILD_DEPENDS+= automake:../../devel/automake
27
28 # gmake, automake, autoconf are only required for patch releases
29
30 GNU_CONFIGURE=  YES
31 USE_GMAKE=      YES
32
33 DOCDIR=         ${PREFIX}/share/doc
34 EXAMPLESDIR=    ${PREFIX}/share/examples
35 MESSAGE_FILE=   ${WRKDIR}/MESSAGE
36
37 post-configure:
38         cd ${WRKSRC}; \
39         ${SED} /ac_cv_make_ntptime/s/no/yes/ < config.cache > config.cache~; \
40         ${MV} config.cache~ config.cache
41         @${MAKE} do-configure
42
43 post-build:
44         ${SED} 's#@PREFIX@#${PREFIX}#g' < ${PKGDIR}/MESSAGE > ${WRKDIR}/MESSAGE
45
46 post-install:
47         cd ${WRKSRC}; \
48         ${PAX} -r -w -s "/html/ntp4/" html ${DOCDIR}; \
49         ${PAX} -r -w -s "/conf/ntp4/" conf ${EXAMPLESDIR}
50         -${RM} ${DOCDIR}/ntp4/.cvs* ${DOCDIR}/ntp4/*.orig ${DOCDIR}/ntp4/hints/*.orig
51         ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCDIR}/ntp4 ${EXAMPLESDIR}/ntp4
52         ${CHMOD} -R ${SHAREMODE} ${DOCDIR}/ntp4 ${EXAMPLESDIR}/ntp4
53         ${CHMOD} a+x ${DOCDIR}/ntp4 ${DOCDIR}/ntp4/hints ${DOCDIR}/ntp4/pic
54         ${CHMOD} a+x ${EXAMPLESDIR}/ntp4
55
56 .include "../../mk/bsd.pkg.mk"