dnsproxy: Update to 0.69.2
[feed/packages.git] / net / dnsproxy / Makefile
1 # SPDX-License-Identifier: GPL-3.0-only
2 #
3 # Copyright (C) 2021 ImmortalWrt.org
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=dnsproxy
8 PKG_VERSION:=0.69.2
9 PKG_RELEASE:=1
10
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
13 PKG_HASH:=aa1cea0eea683bde017acbb30c09c96b24b30133e157e743666be900ad7560ea
14
15 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
16 PKG_LICENSE:=Apache-2.0
17 PKG_LICENSE_FILES:=LICENSE
18
19 PKG_BUILD_DEPENDS:=golang/host
20 PKG_BUILD_PARALLEL:=1
21 PKG_BUILD_FLAGS:=no-mips16
22
23 GO_PKG:=github.com/AdguardTeam/dnsproxy
24 GO_PKG_LDFLAGS_X:=$(GO_PKG)/internal/version.version=v$(PKG_VERSION)
25
26 include $(INCLUDE_DIR)/package.mk
27 include ../../lang/golang/golang-package.mk
28
29 define Package/dnsproxy
30 SECTION:=net
31 CATEGORY:=Network
32 SUBMENU:=IP Addresses and Names
33 TITLE:=Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
34 URL:=https://github.com/AdguardTeam/dnsproxy
35 DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
36 USERID:=dnsproxy=411:dnsproxy=411
37 endef
38
39 define Package/dnsproxy/description
40 A simple DNS proxy server that supports all existing DNS protocols including
41 DNS-over-TLS, DNS-over-HTTPS, DNSCrypt, and DNS-over-QUIC.Moreover, it can
42 work as a DNS-over-HTTPS, DNS-over-TLS or DNS-over-QUIC server.
43 endef
44
45 define Package/dnsproxy/install
46 $(call GoPackage/Package/Install/Bin,$(1))
47
48 $(INSTALL_DIR) $(1)/etc/config/
49 $(INSTALL_CONF) $(CURDIR)/files/dnsproxy.config $(1)/etc/config/dnsproxy
50 $(INSTALL_DIR) $(1)/etc/init.d/
51 $(INSTALL_BIN) $(CURDIR)/files/dnsproxy.init $(1)/etc/init.d/dnsproxy
52 $(INSTALL_DIR) $(1)/etc/uci-defaults/
53 $(INSTALL_BIN) $(CURDIR)/files/dnsproxy.defaults $(1)/etc/uci-defaults/80-dnsproxy-migration
54 endef
55
56 define Package/dnsproxy/conffiles
57 /etc/config/dnsproxy
58 endef
59
60 $(eval $(call GoBinPackage,dnsproxy))
61 $(eval $(call BuildPackage,dnsproxy))