aboutsummaryrefslogtreecommitdiffstats
path: root/net/ntp/Makefile
blob: d3523293090d90ceeb19e6dea393a67782cbec02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Created by: andreas
# $FreeBSD$

PORTNAME=   ntp
PORTVERSION?=   4.2.6p5
PORTREVISION=   2
CATEGORIES= net ipv6
MASTER_SITES=   ftp://ftp.udel.edu/pub/ntp/ntp4/ \
        http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ \
        ftp://ftp.archive.de.uu.net/pub/unix/ntp/ntp4/ \
        ftp://ftp.netlab.is.tsukuba.ac.jp/pub/network/ntp/ntp4/
DISTNAME=   ${PORTNAME}-${PORTVERSION:S/P/p/:S/.r/-RC/}

MAINTAINER= cy@FreeBSD.org
COMMENT=    The Network Time Protocol Distribution

LATEST_LINK=    ${PORTNAME}

GNU_CONFIGURE=  yes
USE_AUTOTOOLS=  automake libtool

MAN1=       sntp.1 \
        ntpd.1 \
        ntpdc.1 \
        ntpq.1 \
        ntpsnmpd.1 \
        ntp-keygen.1 \

.include "Makefile.inc"

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNTPSNMPD}
PLIST_FILES+=       bin/ntpsnmpd
BUILD_DEPENDS+=     ${LOCALBASE}/include/net-snmp/net-snmp-config.h:${PORTSDIR}/net-mgmt/net-snmp
RUN_DEPENDS+=       ${LOCALBASE}/include/net-snmp/net-snmp-config.h:${PORTSDIR}/net-mgmt/net-snmp
.else
CONFIGURE_ARGS+=    --without-ntpsnmpd
.endif

.if ${PORT_OPTIONS:MSSL}
USE_OPENSSL=        yes
CONFIGURE_ARGS+=    --with-openssl-incdir=${OPENSSLINC} \
            --with-openssl-libdir=${OPENSSLLIB}
PLIST_SUB+=     SSL=""
.else
CONFIGURE_ARGS+=        --without-crypto
PLIST_SUB+=             SSL="@comment "
.endif

.if ${PORT_OPTIONS:MIPV6}
CONFIGURE_ARGS+=        --enable-ipv6
.endif

.if ${PORT_OPTIONS:MNTP_SIGND}
CONFIGURE_ARGS+=        --enable-ntp-signd
.endif

.for D in ${NTP_DRIVERS}
.if ${PORT_OPTIONS:M${D}}
CONFIGURE_ARGS+=    --enable-${D}
.endif
.endfor

AUTOTOOLSFILES= aclocal.m4

post-patch:
    @${REINPLACE_CMD} -e 's|1.11.1|%%AUTOMAKE_APIVER%%|g' \
              ${WRKSRC}/aclocal.m4

post-install:
    @${MKDIR} ${EXAMPLESDIR}
    @${INSTALL_DATA} ${WRKSRC}/conf/* ${EXAMPLESDIR}
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    @${FIND} ${WRKSRC}/html -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
    @cd ${WRKSRC}/html && ${FIND} . -print | \
        ${CPIO} -pdu -R ${SHAREOWN}:${SHAREGRP} --quiet ${DOCSDIR}
.endif

.include <bsd.port.mk>