aboutsummaryrefslogtreecommitdiffstats
path: root/dns/knot1/Makefile
blob: 6649b5a9510c8786fa2d114f8fe78995d0ce7242 (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: Leo Vandewoestijne <freebsd@dns-lab.com>
# $FreeBSD$

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

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

LICENSE=    GPLv3

BUILD_DEPENDS=  flex>=2.5.35_1:textproc/flex
LIB_DEPENDS=    liburcu.so:sysutils/liburcu

CONFLICTS=  knot-2.* knot2-.*

USES=       alias bison libtool pkgconfig tar:xz
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-storage=/var/db/knot \
        --with-rundir=/var/run/knot \
        --with-openssl=${OPENSSLBASE}
USE_LDCONFIG=   yes
USE_OPENSSL=    yes
WITH_OPENSSL_PORT=  yes

.if defined(BATCH) || defined(PACKAGE_BUILDING)
CONFIGURE_ARGS+=    --disable-silent-rules
.endif

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 IDN LMDB

DNSTAP_DESC=        dnstap support (see dnstap.info)
LMDB_DESC=      Enable LMDB backend

DNSTAP_CONFIGURE_ENABLE=    dnstap
DNSTAP_LIB_DEPENDS= libfstrm.so:devel/fstrm \
            libprotobuf-c.so:devel/protobuf-c

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

LMDB_CONFIGURE_ENABLE=  lmdb
LMDB_LIB_DEPENDS=   liblmdb.so:databases/lmdb

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} -rf ${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>