aboutsummaryrefslogtreecommitdiff
path: root/dns/samba-nsupdate/Makefile
blob: 902965fff51f098236852c50554360c3edfdc16c (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# $FreeBSD$

PORTNAME=		nsupdate
PORTVERSION=		9.14.2
PORTREVISION=		0
CATEGORIES=		dns net ipv6
MASTER_SITES=		ISC/bind9/${ISCVERSION}
PKGNAMEPREFIX=		samba-
DISTNAME=		bind-${ISCVERSION}

MAINTAINER=		timur@FreeBSD.org
COMMENT=		nsupdate utility with GSS-TSIG support

LICENSE=		MPL20
LICENSE_FILE=		${WRKSRC}/COPYRIGHT

USES=			compiler:c11 cpe libedit autoreconf libtool pkgconfig ssl
# ISC releases things like 9.8.0-P1, which our versioning doesn't like
ISCVERSION=		9.14.2

CPE_VENDOR=		isc
CPE_VERSION=		${ISCVERSION:C/-.*//}
.if ${ISCVERSION:M*-*}
CPE_UPDATE=		${ISCVERSION:C/.*-//:tl}
.endif

GNU_CONFIGURE=		yes

CONFIGURE_ARGS+=	\
			--prefix=${PREFIX} \
			--sysconfdir="${PREFIX}/etc/namedb" \
			--localstatedir=/var \
			--enable-largefile \
			--enable-threads \
			--disable-linux-caps \
			--disable-shared \
			--disable-symtable \
			--with-dlopen=yes \
			--with-readline="-L${LOCALBASE}/lib -ledit" \
			--with-openssl=${OPENSSLBASE} \
			--without-libxml2 \
			--without-iconv \
			--without-python \
			--without-idn

CONFIGURE_ENV+=		STD_CDEFINES="-DDIG_SIGCHASE=1" ACLOCAL_AMFLAGS="-I m4"

MAKE_JOBS_UNSAFE=	yes

OPTIONS_DEFAULT=	GSSAPI_BASE

OPTIONS_DEFINE=		IPV6
OPTIONS_SINGLE=		GSSAPI
OPTIONS_SINGLE_GSSAPI=	GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT

OPTIONS_SUB=		yes

GSSAPI_BASE_DESC=	Using Heimdal in base
GSSAPI_HEIMDAL_DESC=	Using security/heimdal
GSSAPI_MIT_DESC=	Using security/krb5

GSSAPI_BASE_CONFIGURE_ON=\
			--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
GSSAPI_BASE_USES=	gssapi

GSSAPI_HEIMDAL_CONFIGURE_ON=\
			--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
GSSAPI_HEIMDAL_USES=	gssapi:heimdal

GSSAPI_MIT_CONFIGURE_ON=\
			--with-gssapi=${GSSAPIBASEDIR} KRB5CONFIG="${KRB5CONFIG}"
GSSAPI_MIT_USES=	gssapi:mit

IPV6_CONFIGURE_ENABLE=	ipv6

PLIST_FILES=		bin/${PKGBASE} \
			man/man1/${PKGBASE}.1.gz

.include <bsd.port.pre.mk>

post-patch:
		@${REINPLACE_CMD} \
			-e 's|^SUBDIRS.*|SUBDIRS = lib bin|' \
			-e 's|isc-config.sh installdirs|installdirs|' \
			-e 's|.*INSTALL.*isc-config.*||' \
			-e 's|.*INSTALL.*bind.keys.*||' \
		${PATCH_WRKSRC}/Makefile.in
		@${REINPLACE_CMD} \
			-e 's|^SUBDIRS.*|SUBDIRS = ${PORTNAME} \\|' \
			-e 's|^.*check confgen ||' \
			-e '/tests$$/d' \
		${PATCH_WRKSRC}/bin/Makefile.in
		@${REINPLACE_CMD} \
			-e 's|${PORTNAME}|${PKGBASE}|g' \
		${PATCH_WRKSRC}/bin/nsupdate/${PORTNAME}.1

do-install:
		${INSTALL_MAN} ${INSTALL_WRKSRC}/bin/nsupdate/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1/${PKGBASE}.1
		${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/bin/nsupdate/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PKGBASE}

.include <bsd.port.post.mk>