e79955d215b342d0c1448e1458010abc2700a4cd
[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.7.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:=383ef6db1cccabd2dd788ea9385f05e98a2bafdfeb7f0eda57ff9d572f4fad71
19
20 PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
21 PKG_LICENSE:=GPL-3.0-later
22 PKG_LICENSE_FILES:=COPYING
23
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/meson.mk
28
29 define Package/knot-resolver
30 SECTION:=net
31 CATEGORY:=Network
32 SUBMENU:=IP Addresses and Names
33 TITLE:=Knot DNS Resolver
34 URL:=https://www.knot-resolver.cz
35 DEPENDS=\
36 +knot-libs \
37 +knot-libzscanner \
38 +libuv \
39 +luajit \
40 +luasec \
41 +luasocket \
42 +libstdcpp \
43 +libnghttp2 \
44 +lmdb \
45 PACKAGE_knot-resolver_dnstap:libfstrm \
46 PACKAGE_knot-resolver_dnstap:libprotobuf-c
47 USERID:=kresd=3536:kresd=3536
48 endef
49
50 define Package/knot-resolver/description
51 The Knot Resolver is a caching full resolver
52 implementation, including both a resolver library and a daemon.
53 endef
54
55 define Package/knot-resolver/config
56 source "$(SOURCE)/Config.in"
57 endef
58
59 MESON_ARGS+= \
60 $(if $(CONFIG_PACKAGE_knot-resolver_dnstap), -Ddnstap=enabled,-Ddnstap=disabled) \
61 -Dcapng=disabled \
62 -Dclient=disabled \
63 -Dconfig_tests=disabled \
64 -Ddnstap=disabled \
65 -Ddoc=disabled \
66 -Dinstall_kresd_conf=disabled \
67 -Dinstall_root_keys=disabled \
68 -Dkeyfile_default=/etc/knot-resolver/root.keys \
69 -Dprefix=/usr \
70 -Dunit_tests=disabled \
71 -Dutils=disabled
72
73 define Package/knot-resolver/install
74 $(INSTALL_DIR) $(1)/usr/sbin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kresd $(1)/usr/sbin/
76
77 $(INSTALL_DIR) $(1)/usr/lib/knot-resolver
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/knot-resolver/{*.lua,*.so} $(1)/usr/lib/knot-resolver/
80 $(INSTALL_DIR) $(1)/usr/lib/knot-resolver/kres_modules
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/knot-resolver/kres_modules/{*.lua,*.so} $(1)/usr/lib/knot-resolver/kres_modules/
82 $(INSTALL_DIR) $(1)/etc/init.d
83 $(INSTALL_BIN) ./files/kresd.init $(1)/etc/init.d/kresd
84
85 $(INSTALL_DIR) $(1)/etc/knot-resolver
86 $(CP) $(PKG_INSTALL_DIR)/etc/knot-resolver/root.hints $(1)/etc/knot-resolver/
87 $(CP) ./files/root.keys $(1)/etc/knot-resolver
88 endef
89
90 $(eval $(call BuildPackage,knot-resolver))