Merge pull request #14943 from aTanW/master
[feed/packages.git] / net / knot-resolver / Makefile
1 #
2 # Copyright (C) 2015-2021 CZ.NIC, z. s. p. o. (https://www.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 PKG_RELRO_FULL:=0
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_NAME:=knot-resolver
13 PKG_VERSION:=5.3.0
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-resolver
18 PKG_HASH:=fb6cb2c03f4fffbdd8a0098127383d03b14cf7d6abf3a0cd229fb13ff68ee33e
19
20 PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
21 PKG_LICENSE:=GPL-3.0-later
22 PKG_LICENSE_FILES:=COPYING
23
24 PKG_BUILD_DEPENDS:=meson/host
25 PKG_INSTALL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28 include ../../devel/meson/meson.mk
29
30 define Package/knot-resolver
31 SECTION:=net
32 CATEGORY:=Network
33 SUBMENU:=IP Addresses and Names
34 TITLE:=Knot DNS Resolver
35 URL:=https://www.knot-resolver.cz
36 DEPENDS=\
37 +knot-libs \
38 +knot-libzscanner \
39 +libuv \
40 +luajit \
41 +luasec \
42 +luasocket \
43 +libstdcpp \
44 +libnghttp2 \
45 +lmdb \
46 PACKAGE_knot-resolver_dnstap:libfstrm \
47 PACKAGE_knot-resolver_dnstap:libprotobuf-c
48 USERID:=kresd=3536:kresd=3536
49 endef
50
51 define Package/knot-resolver/description
52 The Knot Resolver is a caching full resolver
53 implementation, including both a resolver library and a daemon.
54 endef
55
56 define Package/knot-resolver/config
57 source "$(SOURCE)/Config.in"
58 endef
59
60 MESON_ARGS+= \
61 $(if $(CONFIG_PACKAGE_knot-resolver_dnstap), -Ddnstap=enabled,-Ddnstap=disabled) \
62 -Dcapng=disabled \
63 -Dclient=disabled \
64 -Dconfig_tests=disabled \
65 -Ddnstap=disabled \
66 -Ddoc=disabled \
67 -Dinstall_kresd_conf=disabled \
68 -Dinstall_root_keys=disabled \
69 -Dkeyfile_default=/etc/knot-resolver/root.keys \
70 -Dprefix=/usr \
71 -Dunit_tests=disabled \
72 -Dutils=disabled
73
74 define Package/knot-resolver/install
75 $(INSTALL_DIR) $(1)/usr/sbin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kresd $(1)/usr/sbin/
77
78 $(INSTALL_DIR) $(1)/usr/lib/knot-resolver
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/knot-resolver/{*.lua,*.so} $(1)/usr/lib/knot-resolver/
81 $(INSTALL_DIR) $(1)/usr/lib/knot-resolver/kres_modules
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/knot-resolver/kres_modules/{*.lua,*.so} $(1)/usr/lib/knot-resolver/kres_modules/
83 $(INSTALL_DIR) $(1)/etc/init.d
84 $(INSTALL_BIN) ./files/kresd.init $(1)/etc/init.d/kresd
85
86 $(INSTALL_DIR) $(1)/etc/knot-resolver
87 $(CP) $(PKG_INSTALL_DIR)/etc/knot-resolver/root.hints $(1)/etc/knot-resolver/
88 $(CP) ./files/root.keys $(1)/etc/knot-resolver
89 endef
90
91 $(eval $(call BuildPackage,knot-resolver))