https-dns-proxy: only restart firewall when needed
[feed/packages.git] / net / https-dns-proxy / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=https-dns-proxy
4 PKG_VERSION:=2023-10-25
5 PKG_RELEASE:=5
6
7 PKG_SOURCE_PROTO:=git
8 PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/
9 PKG_SOURCE_DATE:=$(PKG_VERSION)
10 PKG_SOURCE_VERSION:=977341a4e35a37ee454e97e82caf4276b1b4961a
11 PKG_MIRROR_HASH:=8622846f1038ac05436a48d9b36a07c516cbb6504ce68e7ee8c5529788fac39b
12
13 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
14 PKG_LICENSE:=MIT
15 PKG_LICENSE_FILES:=LICENSE
16
17 include $(INCLUDE_DIR)/package.mk
18 include $(INCLUDE_DIR)/cmake.mk
19
20 CMAKE_OPTIONS += -DCLANG_TIDY_EXE= -DGIT_VERSION=$(PKG_VERSION)-$(PKG_RELEASE)
21
22 define Package/https-dns-proxy
23 SECTION:=net
24 CATEGORY:=Network
25 TITLE:=DNS Over HTTPS Proxy
26 URL:=https://docs.openwrt.melmac.net/https-dns-proxy/
27 DEPENDS:=+libcares +libcurl +libev +ca-bundle +jsonfilter
28 DEPENDS+=+!BUSYBOX_DEFAULT_GREP:grep
29 DEPENDS+=+!BUSYBOX_DEFAULT_SED:sed
30 CONFLICTS:=https_dns_proxy
31 endef
32
33 define Package/https-dns-proxy/description
34 Light-weight DNS-over-HTTPS, non-caching translation proxy for the RFC 8484 DoH standard.
35 It receives regular (UDP) DNS requests and resolves them via DoH resolver.
36 Please see https://docs.openwrt.melmac.net/https-dns-proxy/ for more information.
37 endef
38
39 define Package/https-dns-proxy/conffiles
40 /etc/config/https-dns-proxy
41 endef
42
43 define Package/https-dns-proxy/install
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/https_dns_proxy $(1)/usr/sbin/https-dns-proxy
46 $(INSTALL_DIR) $(1)/etc/init.d
47 $(INSTALL_BIN) ./files/etc/init.d/https-dns-proxy $(1)/etc/init.d/https-dns-proxy
48 $(SED) "s|^\(readonly PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/etc/init.d/https-dns-proxy
49 $(INSTALL_DIR) $(1)/etc/config
50 $(INSTALL_CONF) ./files/etc/config/https-dns-proxy $(1)/etc/config/https-dns-proxy
51 $(INSTALL_DIR) $(1)/etc/uci-defaults/
52 $(INSTALL_BIN) ./files/etc/uci-defaults/50-https-dns-proxy-migrate-options.sh $(1)/etc/uci-defaults/50-https-dns-proxy-migrate-options.sh
53 endef
54
55 $(eval $(call BuildPackage,https-dns-proxy))