aboutsummaryrefslogtreecommitdiffstats
path: root/dns/maradns1/Makefile
blob: f76966eabbb267d1a48db274b516cdee50708a57 (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
# Created by: Anders Nordby <anders@fix.no>
# $FreeBSD$

PORTNAME=   maradns
PORTVERSION=    1.4.15
CATEGORIES= dns
MASTER_SITES=   http://maradns.samiam.org/download/1.4/\
        http://www.maradns.org/download/1.4/
PKGNAMESUFFIX=  1

MAINTAINER= mat@FreeBSD.org
COMMENT=    DNS server with focus on security and simplicity

LICENSE=    BSD2CLAUSE
LICENSE_FILE=   ${WRKSRC}/COPYING

DEPRECATED= MaraDNS 1 end-of-life: June 21, 2015, use dns/maradns
EXPIRATION_DATE=2015-06-21

REINPLACE_ARGS= -i ""
MAKE_ENV=   FLAGS="${CFLAGS}"

USE_RC_SUBR=    ${PORTNAME} zoneserver
USES=       tar:xz
USERS=      bind
GROUPS=     bind

OPTIONS_DEFINE= DOCS EXAMPLES

post-patch:
    @${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e \
        's|/etc/maradns|${ETCDIR}|g; s|/etc/mararc|${ETCDIR}|g'
    @${FIND} ${WRKSRC} -name '*Makefile*' | ${XARGS} ${REINPLACE_CMD} -e \
        's|make|\$$\{MAKE\}|g ; \
         s|^FLAGS =|#FLAGS =|g'

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/server/maradns ${STAGEDIR}${PREFIX}/sbin
    ${INSTALL_PROGRAM} ${WRKSRC}/tcp/getzone ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/tcp/fetchzone ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/tcp/zoneserver ${STAGEDIR}${PREFIX}/sbin
    ${INSTALL_PROGRAM} ${WRKSRC}/tools/askmara ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/tools/duende ${STAGEDIR}${PREFIX}/bin

    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/askmara.1 ${STAGEDIR}${MANPREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/getzone.1 ${STAGEDIR}${MANPREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/fetchzone.1 ${STAGEDIR}${MANPREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/maradns.8 ${STAGEDIR}${MANPREFIX}/man/man8
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/zoneserver.8 ${STAGEDIR}${MANPREFIX}/man/man8
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/duende.8 ${STAGEDIR}${MANPREFIX}/man/man8
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/mararc.5 ${STAGEDIR}${MANPREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/csv1.5 ${STAGEDIR}${MANPREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/csv2.5 ${STAGEDIR}${MANPREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/doc/en/man/csv2_txt.5 ${STAGEDIR}${MANPREFIX}/man/man5

    ${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_full_mararc ${STAGEDIR}${PREFIX}/etc/mararc.sample

    ${MKDIR} ${STAGEDIR}${ETCDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_csv2 ${STAGEDIR}${ETCDIR}/example_csv2
    ${MKDIR} ${STAGEDIR}${ETCDIR}/logger
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    (cd ${WRKSRC}/doc/en/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
    @${MKDIR} ${STAGEDIR}${DOCSDIR}/en
    ${INSTALL_DATA} ${WRKSRC}/doc/en/*.* ${STAGEDIR}${DOCSDIR}/en
    ${INSTALL_DATA} ${WRKSRC}/doc/en/QuickStart ${STAGEDIR}${DOCSDIR}/en
    ${INSTALL_DATA} ${WRKSRC}/doc/en/README ${STAGEDIR}${DOCSDIR}/en
    (cd ${WRKSRC}/doc/en && ${COPYTREE_SHARE} misc ${STAGEDIR}${DOCSDIR}/en)
    (cd ${WRKSRC}/doc/en && ${COPYTREE_SHARE} pdf ${STAGEDIR}${DOCSDIR}/en)
    (cd ${WRKSRC}/doc/en && ${COPYTREE_SHARE} tutorial ${STAGEDIR}${DOCSDIR}/en)
    (cd ${WRKSRC}/doc/en && ${COPYTREE_SHARE} text ${STAGEDIR}${DOCSDIR}/en)
    @(cd ${STAGEDIR}${PREFIX} && find . -name Makefile -delete)

.include <bsd.port.mk>