Lines 1-131
Link Here
|
1 |
# Created by: Leo Vandewoestijne <freebsd@dns.company> |
1 |
# Created by: Leo Vandewoestijne <freebsd@dns.company> |
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= knot-resolver |
4 |
PORTNAME= knot-resolver |
5 |
DISTVERSION= 5.1.1 |
5 |
DISTVERSION= 5.1.2 |
6 |
CATEGORIES= dns |
6 |
CATEGORIES= dns |
7 |
MASTER_SITES= https://secure.nic.cz/files/knot-resolver/ \ |
7 |
MASTER_SITES= https://secure.nic.cz/files/knot-resolver/ \ |
8 |
https://dns.company/downloads/knot-resolver/ |
8 |
https://dns.company/downloads/knot-resolver/ |
9 |
|
9 |
|
10 |
MAINTAINER= freebsd@dns.company |
10 |
MAINTAINER= freebsd@dns.company |
11 |
COMMENT= Caching full resolver implementation |
11 |
COMMENT= Caching full resolver implementation |
12 |
|
12 |
|
13 |
LICENSE= GPLv3+ |
13 |
LICENSE= GPLv3+ |
14 |
LICENSE_FILE= ${WRKSRC}/COPYING |
14 |
LICENSE_FILE= ${WRKSRC}/COPYING |
15 |
|
15 |
|
16 |
BUILD_DEPENDS= bash:shells/bash \ |
16 |
BUILD_DEPENDS= bash:shells/bash \ |
17 |
cmocka>=1.1.1:sysutils/cmocka \ |
|
|
18 |
flake8:devel/py-flake8@${PY_FLAVOR} \ |
17 |
flake8:devel/py-flake8@${PY_FLAVOR} \ |
19 |
luacheck:devel/lua-luacheck |
18 |
lua51-cqueues>=20200603_1:devel/lua-cqueues@lua51 \ |
20 |
|
19 |
luacheck:devel/lua-luacheck \ |
21 |
LIB_DEPENDS= libgnutls.so:security/gnutls \ |
20 |
cmake:devel/cmake |
22 |
libknot.so:dns/knot2-lib \ |
21 |
|
|
|
22 |
LIB_DEPENDS= libknot.so:dns/knot2-lib \ |
23 |
libdnssec.so:dns/knot2-lib \ |
24 |
libzscanner.so:dns/knot2-lib \ |
25 |
libgnutls.so:security/gnutls \ |
23 |
liblmdb.so:databases/lmdb \ |
26 |
liblmdb.so:databases/lmdb \ |
24 |
libluajit-5.1.so:lang/luajit-openresty \ |
27 |
libluajit-5.1.so:lang/luajit-openresty \ |
25 |
libuv.so:devel/libuv |
28 |
libuv.so:devel/libuv |
26 |
|
29 |
|
27 |
USES= compiler:c11 compiler:c++11-lang libedit libtool meson \ |
30 |
RUN_DEPENDS= lua51-cqueues>=20200603_1:devel/lua-cqueues@lua51 \ |
28 |
ncurses ninja pkgconfig python shebangfix tar:xz |
31 |
|
|
|
32 |
USES= compiler:c11 compiler:c++11-lang libedit libtool \ |
33 |
meson ncurses ninja pkgconfig python:3.5+,build \ |
34 |
shebangfix tar:xz |
35 |
|
29 |
USE_CXXSTD= c++11 |
36 |
USE_CXXSTD= c++11 |
30 |
USE_LDCONFIG= yes |
|
|
31 |
LDFLAGS+= -L${LOCALBASE}/lib |
32 |
|
37 |
|
33 |
SUB_FILES= pkg-message |
38 |
USE_RC_SUBR= krescachegc kresd |
34 |
|
39 |
|
35 |
SHEBANG_FILES= scripts/bench.sh \ |
40 |
SHEBANG_FILES= scripts/bench.sh \ |
36 |
scripts/build-in-obs.sh \ |
41 |
scripts/build-in-obs.sh \ |
37 |
scripts/coverage_c_combine.sh \ |
42 |
scripts/coverage_c_combine.sh \ |
38 |
scripts/coverage_env.sh \ |
43 |
scripts/coverage_env.sh \ |
39 |
scripts/gen-cdefs.sh \ |
44 |
scripts/gen-cdefs.sh \ |
40 |
scripts/get-date.sh \ |
45 |
scripts/get-date.sh \ |
41 |
scripts/get-scanbuild-args.sh \ |
46 |
scripts/get-scanbuild-args.sh \ |
42 |
scripts/luacov_gen_empty.sh \ |
47 |
scripts/luacov_gen_empty.sh \ |
43 |
scripts/make-dev-archive.sh \ |
48 |
scripts/make-dev-archive.sh \ |
44 |
scripts/make-distrofiles.sh \ |
49 |
scripts/make-distrofiles.sh \ |
45 |
scripts/make-doc.sh \ |
50 |
scripts/make-doc.sh \ |
46 |
scripts/make-srpm.sh \ |
51 |
scripts/make-srpm.sh \ |
47 |
scripts/obs-build.sh \ |
52 |
scripts/obs-build.sh \ |
48 |
scripts/run-pylint.sh \ |
53 |
scripts/run-pylint.sh \ |
49 |
scripts/test-config.sh \ |
54 |
scripts/test-config.sh \ |
50 |
scripts/test-integration-prepare.sh \ |
55 |
scripts/test-integration-prepare.sh \ |
51 |
scripts/update-root-hints.sh |
56 |
scripts/update-root-hints.sh |
52 |
|
57 |
|
53 |
CONFLICTS= knot-1.* knot1-[0-6].* |
|
|
54 |
|
55 |
MESON_ARGS= --buildtype=release \ |
58 |
MESON_ARGS= --buildtype=release \ |
56 |
--default-library=static \ |
59 |
--default-library=static \ |
|
|
60 |
--libdir=${PREFIX}/lib \ |
61 |
--pkg-config-path=${PREFIX}/libdata/pkgconfig \ |
57 |
--prefix=${LOCALBASE} \ |
62 |
--prefix=${LOCALBASE} \ |
58 |
-Duser=${USERS} \ |
63 |
-Duser=${USERS} \ |
59 |
-Dgroup=${GROUPS} \ |
64 |
-Dgroup=${GROUPS} \ |
60 |
-Dinstall_kresd_conf=enabled \ |
65 |
-Dinstall_kresd_conf=enabled \ |
61 |
-Dclient=enabled \ |
66 |
-Dclient=enabled \ |
62 |
-Dutils=enabled \ |
67 |
-Dutils=enabled \ |
63 |
-Dinstall_root_keys=enabled \ |
|
|
64 |
-Dkeyfile_default=${ETCDIR}/root.keys \ |
68 |
-Dkeyfile_default=${ETCDIR}/root.keys \ |
65 |
-Dmanaged_ta=enabled \ |
69 |
-Droot_hints=${ETCDIR}/root.hints |
66 |
-Droot_hints=${ETCDIR}/root.hints \ |
70 |
|
67 |
-Dunit_tests=enabled |
71 |
LDFLAGS+= -L${LOCALBASE}/lib |
68 |
|
72 |
|
69 |
# --libdir=${PREFIX}/lib |
73 |
CONFLICTS= knot-1.* knot1-[0-6].* |
70 |
# --pkg-config-path=${PREFIX}/libdata/pkgconfig |
74 |
|
71 |
# lmdb_CFLAGS=-I${PREFIX}/include lmdb_LIBS=-llmdb |
75 |
SUB_FILES= pkg-message |
72 |
# -Dlmdb_CFLAGS=-I${PREFIX}/include \ # doesn't help |
76 |
|
73 |
# -Dlmdb_LIBS=-llmdb # doesn't help |
77 |
SUB_LIST= USERS=${USERS} \ |
74 |
# -Dconfig_tests=enabled \ # complains about missing cqueues lua package |
78 |
GROUPS=${GROUPS} \ |
75 |
# -Dextra_tests=enabled \ # also requires -Dsendmmsg=disabled |
79 |
RUNDIR=${RUNDIR} |
76 |
|
|
|
77 |
OPTIONS_DEFINE= DOCS DNSTAP DOXYGEN TRUSTANCHOR |
78 |
OPTIONS_DEFAULT= DOCS DNSTAP DOXYGEN |
79 |
|
80 |
# docs/meson.build wants python2 or python3 - not -for example- python3.7 |
81 |
# So this currently is partially broken: |
82 |
#DOCS_MESON_ON= -Ddoc=enabled |
83 |
|
84 |
DNSTAP_DESC= dnstap support |
85 |
DNSTAP_LIB_DEPENDS= libprotobuf.so:devel/protobuf \ |
86 |
libprotobuf-c.so:devel/protobuf-c \ |
87 |
libfstrm.so:devel/fstrm |
88 |
DNSTAP_PLIST_FILES= lib/knot-resolver/kres_modules/dnstap.so |
89 |
DNSTAP_MESON_ON= -Ddnstap=enabled |
90 |
DNSTAP_MESON_OFF= -Ddnstap=disabled |
91 |
|
92 |
DOXYGEN_IMPLIES= DOCS |
93 |
DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen \ |
94 |
${PY_SPHINX} \ |
95 |
${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR} |
96 |
|
97 |
TRUSTANCHOR_DESC= Trust anchor bootstrapping and stats |
98 |
TRUSTANCHOR_USES= lua |
99 |
TRUSTANCHOR_BUILD_DEPENDS= ${LUA_PKGNAMEPREFIX}luasocket>=0:net/luasocket@${LUA_FLAVOR} \ |
100 |
${LUA_PKGNAMEPREFIX}luasec>=0:security/luasec@${LUA_FLAVOR} |
101 |
|
102 |
.include <bsd.port.options.mk> |
103 |
|
80 |
|
104 |
USERS= kresd |
81 |
USERS= kresd |
105 |
GROUPS= ${USERS} |
82 |
GROUPS= kresd |
|
|
83 |
RUNDIR= /var/run/kresd |
84 |
|
85 |
PLIST_SUB= USERS=${USERS} \ |
86 |
GROUPS=${GROUPS} \ |
87 |
RUNDIR=${RUNDIR} |
88 |
|
89 |
OPTIONS_DEFINE= DOCS EXAMPLES DNSTAP ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF TESTEXTRA |
90 |
OPTIONS_DEFAULT= DOCS EXAMPLES ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF |
91 |
|
92 |
DNSTAP_DESC= dnstap support |
93 |
ROOTKEYS_DESC= install root.keys |
94 |
TESTCONF_DESC= Do config tests |
95 |
TESTEXTRA_DESC= Do extra tests |
96 |
TESTUNIT_DESC= Do unit tests |
97 |
TEST_DESC= Do tests |
98 |
TRUSTANCHOR_DESC= Trust anchor bootstrapping, management and stats |
99 |
|
100 |
DNSTAP_LIB_DEPENDS= libprotobuf.so:devel/protobuf \ |
101 |
libprotobuf-c.so:devel/protobuf-c \ |
102 |
libfstrm.so:devel/fstrm |
103 |
DNSTAP_MESON_ON= -Ddnstap=enabled |
104 |
DNSTAP_MESON_OFF= -Ddnstap=disabled |
105 |
DNSTAP_PLIST_FILES= lib/knot-resolver/kres_modules/dnstap.so |
106 |
|
107 |
ROOTKEYS_MESON_ON= -Dinstall_root_keys=enabled |
108 |
ROOTKEYS_MESON_OFF= -Dinstall_root_keys=disabled |
109 |
ROOTKEYS_PLIST_FILES= ${ETCDIR}/root.keys |
110 |
|
111 |
TESTCONF_MESON_ON= -Dconfig_tests=enabled |
112 |
TESTCONF_MESON_OFF= -Dconfig_tests=disabled |
113 |
|
114 |
TESTEXTRA_BROKEN= CMake Error: The source directory misses CMakeLists.txt |
115 |
TESTEXTRA_BUILD_DEPENDS=git:devel/git |
116 |
TESTEXTRA_USES= cmake python:3 |
117 |
TESTEXTRA_MESON_ON= -Dextra_tests=enabled \ |
118 |
-Dsendmmsg=disabled |
119 |
TESTEXTRA_MESON_OFF= -Dextra_tests=disabled |
120 |
|
121 |
TESTUNIT_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka |
122 |
TESTUNIT_MESON_ON= -Dunit_tests=enabled |
123 |
TESTUNIT_MESON_OFF= -Dunit_tests=disabled |
124 |
|
125 |
TRUSTANCHOR_MESON_ON= -Dmanaged_ta=enabled |
126 |
TRUSTANCHOR_MESON_OFF= -Dmanaged_ta=disabled |
106 |
|
127 |
|
107 |
PORTDOCS= AUTHORS COPYING CodingStyle NEWS README.md |
128 |
PORTDOCS= AUTHORS COPYING CodingStyle NEWS README.md |
|
|
129 |
PORTEXAMPLES= config.cluster config.docker config.internal config.isp \ |
130 |
config.personal config.privacy config.splitview |
108 |
|
131 |
|
109 |
STRIP_TARGETS= sbin/kresd \ |
132 |
STRIP_TARGETS= sbin/kres-cache-gc \ |
110 |
sbin/kresc \ |
133 |
sbin/kresc \ |
|
|
134 |
sbin/kresd \ |
111 |
lib/knot-resolver/ahocorasick.so \ |
135 |
lib/knot-resolver/ahocorasick.so \ |
112 |
lib/knot-resolver/kres_modules/bogus_log.so \ |
136 |
lib/knot-resolver/kres_modules/bogus_log.so \ |
113 |
lib/knot-resolver/kres_modules/dnstap.so \ |
137 |
lib/knot-resolver/kres_modules/dnstap.so \ |
114 |
lib/knot-resolver/kres_modules/edns_keepalive.so \ |
138 |
lib/knot-resolver/kres_modules/edns_keepalive.so \ |
115 |
lib/knot-resolver/kres_modules/hints.so \ |
139 |
lib/knot-resolver/kres_modules/hints.so \ |
116 |
lib/knot-resolver/kres_modules/lib/knot-resolver/kres_modules/nsid.so \ |
140 |
lib/knot-resolver/kres_modules/lib/knot-resolver/kres_modules/nsid.so \ |
117 |
lib/knot-resolver/kres_modules/refuse_nord.so \ |
141 |
lib/knot-resolver/kres_modules/refuse_nord.so \ |
118 |
lib/knot-resolver/kres_modules/stats.so |
142 |
lib/knot-resolver/kres_modules/stats.so |
119 |
|
143 |
|
|
|
144 |
pre-install: |
145 |
${MKDIR} ${STAGEDIR}${DOCSDIR} |
146 |
${MKDIR} ${STAGEDIR}${RUNDIR} |
147 |
|
120 |
pre-install-TEST-on: do-test |
148 |
pre-install-TEST-on: do-test |
121 |
|
149 |
|
122 |
post-install: |
150 |
post-install: |
123 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
|
|
124 |
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ |
151 |
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ |
125 |
.for STRIP_TGT in ${STRIP_TARGETS} |
152 |
.for STRIP_TGT in ${STRIP_TARGETS} |
126 |
if [ -f ${STAGEDIR}${PREFIX}/${STRIP_TGT} ]; then \ |
153 |
if [ -f ${STAGEDIR}${PREFIX}/${STRIP_TGT} ]; then \ |
127 |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${STRIP_TGT}; \ |
154 |
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${STRIP_TGT}; \ |
128 |
fi |
155 |
fi |
129 |
.endfor |
156 |
.endfor |
130 |
|
157 |
|
131 |
.include <bsd.port.mk> |
158 |
.include <bsd.port.mk> |