Merge pull request #16078 from ja-pa/fix-email
[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.39.0
9 PKG_RELEASE:=$(AUTORELESE)
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:=00cf9978670e51be14cab262638735321afa917c3b4f46c0c5a189731ee124bf
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_USE_MIPS16:=0
22
23 GO_PKG:=github.com/AdguardTeam/dnsproxy
24 GO_PKG_LDFLAGS:=-s -w
25 GO_PKG_LDFLAGS_X:=main.VersionString=v$(PKG_VERSION)
26
27 include $(INCLUDE_DIR)/package.mk
28 include ../../lang/golang/golang-package.mk
29
30 define Package/dnsproxy
31 SECTION:=net
32 CATEGORY:=Network
33 SUBMENU:=IP Addresses and Names
34 TITLE:=Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
35 URL:=https://github.com/AdguardTeam/dnsproxy
36 DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
37 USERID:=dnsproxy=411:dnsproxy=411
38 endef
39
40 define Package/dnsproxy/description
41 A simple DNS proxy server that supports all existing DNS protocols including
42 DNS-over-TLS, DNS-over-HTTPS, DNSCrypt, and DNS-over-QUIC.Moreover, it can
43 work as a DNS-over-HTTPS, DNS-over-TLS or DNS-over-QUIC server.
44 endef
45
46 define Package/dnsproxy/install
47 $(call GoPackage/Package/Install/Bin,$(1))
48
49 $(INSTALL_DIR) $(1)/etc/config/
50 $(INSTALL_CONF) $(CURDIR)/files/dnsproxy.config $(1)/etc/config/dnsproxy
51 $(INSTALL_DIR) $(1)/etc/init.d/
52 $(INSTALL_BIN) $(CURDIR)/files/dnsproxy.init $(1)/etc/init.d/dnsproxy
53 endef
54
55 $(eval $(call GoBinPackage,dnsproxy))
56 $(eval $(call BuildPackage,dnsproxy))