|
@@ -0,0 +1,143 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2014 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+#
|
|
7
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=knot
|
|
11
|
+PKG_VERSION:=1.5.0-rc2
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
15
|
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
16
|
+PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
|
|
17
|
+PKG_MD5SUM:=9a93226c200813ee7bfe27dcf7b6cbc9
|
|
18
|
+
|
|
19
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
20
|
+PKG_BUILD_PARALLEL:=1
|
|
21
|
+PKG_FIXUP:=autoreconf
|
|
22
|
+PKG_INSTALL:=1
|
|
23
|
+
|
|
24
|
+include $(INCLUDE_DIR)/package.mk
|
|
25
|
+
|
|
26
|
+define Package/knot/Default
|
|
27
|
+ SECTION:=net
|
|
28
|
+ CATEGORY:=Network
|
|
29
|
+ TITLE:=Knot DNS
|
|
30
|
+ URL:=https://www.knot-dns.cz
|
|
31
|
+ MAINTAINER:=daniel.salzman@nic.cz
|
|
32
|
+ SUBMENU:=IP Addresses and Names
|
|
33
|
+ DEPENDS:=+libopenssl +liburcu
|
|
34
|
+endef
|
|
35
|
+
|
|
36
|
+define Package/knot-libknot
|
|
37
|
+ $(call Package/knot/Default)
|
|
38
|
+ TITLE+= (library)
|
|
39
|
+endef
|
|
40
|
+
|
|
41
|
+define Package/knot
|
|
42
|
+ $(call Package/knot/Default)
|
|
43
|
+ TITLE+= (server)
|
|
44
|
+ DEPENDS+=+knot-libknot
|
|
45
|
+endef
|
|
46
|
+
|
|
47
|
+define Package/knot-utils
|
|
48
|
+ $(call Package/knot/Default)
|
|
49
|
+ TITLE+= (utils)
|
|
50
|
+ DEPENDS+=+knot-libknot
|
|
51
|
+endef
|
|
52
|
+
|
|
53
|
+define Package/knot-tests
|
|
54
|
+ $(call Package/knot/Default)
|
|
55
|
+ TITLE+= (tests)
|
|
56
|
+ DEPENDS+=+knot-libknot
|
|
57
|
+endef
|
|
58
|
+
|
|
59
|
+define Package/knot-libknot/description
|
|
60
|
+ Knot DNS library.
|
|
61
|
+endef
|
|
62
|
+
|
|
63
|
+define Package/knot/description
|
|
64
|
+ High-performance authoritative-only DNS server.
|
|
65
|
+endef
|
|
66
|
+
|
|
67
|
+define Package/knot-utils/description
|
|
68
|
+ DNS utilities: kdig, khost, knsupdate and knsec3hash.
|
|
69
|
+endef
|
|
70
|
+
|
|
71
|
+define Package/knot-tests/description
|
|
72
|
+ Unit tests for Knot DNS server.
|
|
73
|
+ Usage: /usr/share/knot/runtests.sh
|
|
74
|
+endef
|
|
75
|
+
|
|
76
|
+CONFIGURE_ARGS += \
|
|
77
|
+ --enable-recvmmsg=no \
|
|
78
|
+ --disable-fastparser \
|
|
79
|
+ --with-rundir=/var/run \
|
|
80
|
+ --with-storage=/etc/knot
|
|
81
|
+
|
|
82
|
+TARGET_CFLAGS += -std=gnu99 -DPSELECT_COMPAT
|
|
83
|
+
|
|
84
|
+define Build/Compile
|
|
85
|
+ $(MAKE) -C $(PKG_BUILD_DIR)
|
|
86
|
+ $(MAKE) -C $(PKG_BUILD_DIR)/libtap check
|
|
87
|
+ $(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile-only
|
|
88
|
+ $(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile-only
|
|
89
|
+endef
|
|
90
|
+
|
|
91
|
+define Package/knot-libknot/install
|
|
92
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
93
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libknot.so.* $(1)/usr/lib/
|
|
94
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzscanner.so.* $(1)/usr/lib/
|
|
95
|
+endef
|
|
96
|
+
|
|
97
|
+define Package/knot/install
|
|
98
|
+ $(INSTALL_DIR) $(1)/usr/sbin
|
|
99
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knotc $(1)/usr/sbin/
|
|
100
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knotd $(1)/usr/sbin/
|
|
101
|
+
|
|
102
|
+ $(INSTALL_DIR) $(1)/etc/knot
|
|
103
|
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knot/knot.sample.conf $(1)/etc/knot/knot.conf
|
|
104
|
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knot/example.com.zone $(1)/etc/knot/
|
|
105
|
+
|
|
106
|
+ $(INSTALL_DIR) $(1)/etc/init.d
|
|
107
|
+ $(INSTALL_BIN) ./files/knotd.init $(1)/etc/init.d/knotd
|
|
108
|
+endef
|
|
109
|
+
|
|
110
|
+define Package/knot-utils/install
|
|
111
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
112
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdig $(1)/usr/bin/
|
|
113
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/khost $(1)/usr/bin/
|
|
114
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsupdate $(1)/usr/bin/
|
|
115
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knsec3hash $(1)/usr/bin/
|
|
116
|
+endef
|
|
117
|
+
|
|
118
|
+define Package/knot-tests/install
|
|
119
|
+ $(INSTALL_DIR) $(1)/usr/share/knot
|
|
120
|
+ $(INSTALL_BIN) ./files/runtests.sh $(1)/usr/share/knot
|
|
121
|
+
|
|
122
|
+ $(INSTALL_DIR) $(1)/usr/share/knot/tap
|
|
123
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/runtests $(1)/usr/share/knot/tap/
|
|
124
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/tap/libtap.sh $(1)/usr/share/knot/tap/
|
|
125
|
+
|
|
126
|
+ $(INSTALL_DIR) $(1)/usr/share/knot/tests
|
|
127
|
+ find $(PKG_BUILD_DIR)/tests/.libs -maxdepth 1 -executable -type f | \
|
|
128
|
+ xargs -I{} basename {} | \
|
|
129
|
+ xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{} $(1)/usr/share/knot/tests/test_{}
|
|
130
|
+
|
|
131
|
+ $(INSTALL_DIR) $(1)/usr/share/knot/tests/data
|
|
132
|
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/tests/data/sample_conf $(1)/usr/share/knot/tests/data/
|
|
133
|
+
|
|
134
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/.libs/zscanner-tool $(1)/usr/share/knot/tests/
|
|
135
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/unittests $(1)/usr/share/knot/tests/test_zscanner
|
|
136
|
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/zscanner/tests/TESTS $(1)/usr/share/knot/tests/
|
|
137
|
+ cp -a $(PKG_BUILD_DIR)/src/zscanner/tests/data $(1)/usr/share/knot/tests/
|
|
138
|
+endef
|
|
139
|
+
|
|
140
|
+$(eval $(call BuildPackage,knot-libknot))
|
|
141
|
+$(eval $(call BuildPackage,knot))
|
|
142
|
+$(eval $(call BuildPackage,knot-utils))
|
|
143
|
+$(eval $(call BuildPackage,knot-tests))
|