aboutsummaryrefslogtreecommitdiffstats
path: root/dns/knot2/Makefile
blob: d20b9b644e2ff63906f361b0ea0ec7fdc5f61ed8 (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
# Created by: Leo Vandewoestijne <freebsd@dns-lab.com>
# $FreeBSD$

PORTNAME=   knot
PORTVERSION=    2.3.1
CATEGORIES= dns ipv6
MASTER_SITES=   https://secure.nic.cz/files/knot-dns/ \
        http://dns-lab.com/downloads/knot-dns/
PKGNAMESUFFIX=  2

MAINTAINER= freebsd@dns-lab.com
COMMENT=    High performance authoritative-only DNS server

LICENSE=    GPLv3

LIB_DEPENDS=    libfstrm.so:devel/fstrm \
        libgnutls.so:security/gnutls \
        libjansson.so:devel/jansson \
        liblmdb.so:databases/lmdb \
        libnettle.so:security/nettle \
        liburcu.so:sysutils/liburcu

CONFLICTS=  knot-1.* knot1-[0-6].*

USES=       alias libedit libtool pkgconfig tar:xz
USE_LDCONFIG=   yes

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-rundir=/var/run/knot \
        --with-storage=/var/db/knot \
        --with-pkgconfigdir=${PREFIX}/libdata/pkgconfig

INSTALL_TARGET= install-strip

USE_RC_SUBR=    ${PORTNAME}
SUB_FILES=  pkg-message

USERS=      knot
GROUPS=     knot
SUB_LIST+=  USERS="${USERS}" GROUPS="${GROUPS}"

PORTDOCS=   AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS

OPTIONS_DEFINE=         DNSTAP FASTPARSER IDN

DNSTAP_DESC=            dnstap support (see dnstap.info)
DNSTAP_CONFIGURE_ENABLE=    dnstap
DNSTAP_LIB_DEPENDS=     libprotobuf-c.so:devel/protobuf-c
# XXX: because `kdig_CPPFLAGS += $(DNSTAP_CFLAGS)' line is missing from
# `src/Makefile.am' file (and thus pre-generated `src/Makefile.in') which
# should contain "$libfstrm_CFLAGS $libprotobuf_c_CFLAGS" set by configure
# script, provide it here explicitly as patching those files would result
# in higher line count.  Ideally this bug should be fixed upstream.
DNSTAP_CPPFLAGS=        -I${LOCALBASE}/include

FASTPARSER_DESC=        Fast zone parser (demanding compilation)
FASTPARSER_CONFIGURE_ENABLE=    fastparser

IDN_CONFIGURE_WITH=     libidn
IDN_LIB_DEPENDS=        libidn.so:dns/libidn

post-patch:
    @${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@run_dir\@|' \
        ${WRKSRC}/src/Makefile.in
    @${REINPLACE_CMD} 's|$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|#$$(INSTALL) -d $$(DESTDIR)/\@storage_dir\@|' \
        ${WRKSRC}/src/Makefile.in
    @${RM} -r ${WRKSRC}/src/zscanner/scanner.c

post-install:
    ${MV} ${STAGEDIR}${ETCDIR}/knot.sample.conf \
        ${STAGEDIR}${ETCDIR}/knot.conf.sample
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/

.include <bsd.port.mk>