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