OSDN Git Service

dnsproxy: update to 0.43.0
[immortalwrt/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.43.0
9 PKG_RELEASE:=$(AUTORELEASE)
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:=b20a544b9085beda02e50e84819b42526ce90b8745a3dbbec9fe3adfe76e44d4
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_X:=main.VersionString=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 endef
53
54 define Package/dnsproxy/conffiles
55 /etc/config/dnsproxy
56 endef
57
58 $(eval $(call GoBinPackage,dnsproxy))
59 $(eval $(call BuildPackage,dnsproxy))