Tweak dns/mydns version 1.1.0_8
[dports.git] / dns / mydns / Makefile
1 # Created by: Simon Dick <simond@irrelevant.org>
2 # $FreeBSD$
3
4 PORTNAME=       mydns
5 PORTVERSION=    1.1.0
6 PORTREVISION=   8
7 CATEGORIES=     dns databases
8 MASTER_SITES=   http://mydns.bboy.net/download/
9
10 MAINTAINER=     ale@FreeBSD.org
11 COMMENT=        DNS server designed to utilize the MySQL database
12
13 LICENSE=        GPLv2
14
15 OPTIONS_DEFINE= ALIAS OPENSSL PGSQL NLS DOCS NLS
16
17 GNU_CONFIGURE=  yes
18 CONFIGURE_ARGS= --with-confdir=${PREFIX}/etc
19 USES=           tar:bzip2 iconv
20
21 USE_RC_SUBR=    mydns
22
23 SUB_FILES=      pkg-message
24
25 INFO=           mydns
26
27 DOCS=           AUTHORS COPYING ChangeLog NEWS QUICKSTART.mysql QUICKSTART.postgres README TODO
28
29 .include <bsd.port.options.mk>
30
31 .if ${PORT_OPTIONS:MALIAS}
32 CONFIGURE_ARGS+=--enable-alias
33 .endif
34
35 .if ${PORT_OPTIONS:MOPENSSL}
36 USES+=          ssl
37 CONFIGURE_ARGS+=--with-openssl \
38                 --with-openssl-include=${OPENSSLINC} \
39                 --with-openssl-lib=${OPENSSLLIB}
40 .endif
41
42 .if ${PORT_OPTIONS:MPGSQL}
43 USES+=          pgsql
44 CONFIGURE_ARGS+=--without-mysql \
45                 --with-pgsql-include=${LOCALBASE}/include \
46                 --with-pgsql-lib=${LOCALBASE}/lib
47 PKGNAMESUFFIX=  -pg
48 .else
49 USES+=          mysql
50 CONFIGURE_ARGS+=--without-pgsql \
51                 --with-mysql-include=${LOCALBASE}/include/mysql \
52                 --with-mysql-lib=${LOCALBASE}/lib/mysql
53 PKGNAMESUFFIX=  -mysql
54 .endif
55
56 .if ${PORT_OPTIONS:MNLS}
57 USES+=          gettext
58 PLIST_SUB+=     NLS=""
59 .else
60 CONFIGURE_ARGS+=--disable-nls
61 PLIST_SUB+=     NLS="@comment "
62 .endif
63
64 post-install:
65 .if ${PORT_OPTIONS:MDOCS}
66         @${MKDIR} ${STAGEDIR}${DOCSDIR}/contrib
67 .for f in ${DOCS}
68         @${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/
69 .endfor
70         @${INSTALL_DATA} ${WRKSRC}/contrib/*.php ${STAGEDIR}${DOCSDIR}/contrib/
71         @${INSTALL_DATA} ${WRKSRC}/contrib/*.pl ${STAGEDIR}${DOCSDIR}/contrib/
72         @${INSTALL_DATA} ${WRKSRC}/contrib/*.pm ${STAGEDIR}${DOCSDIR}/contrib/
73         @${INSTALL_DATA} ${WRKSRC}/contrib/README ${STAGEDIR}${DOCSDIR}/contrib/
74 .endif
75         @${STAGEDIR}${PREFIX}/sbin/mydns --dump-config > ${STAGEDIR}${PREFIX}/etc/mydns.conf.sample
76
77 .include <bsd.port.mk>