2 # Copyright (C) 2019 NextDNS Inc
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=nextdns-
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_VERSION
:=v
$(PKG_VERSION
)
16 PKG_SOURCE_URL
:=https
://codeload.github.com
/nextdns
/nextdns
/tar.gz
/v
$(PKG_VERSION
)?
17 PKG_HASH
:=db96f85d7ba50679ba926f3b9542c18aa2466eb9d39d747eb8076c16d27f355e
19 PKG_MAINTAINER
:=Olivier Poitrey
<rs@nextdns.io
>
21 PKG_LICENSE_FILES
:=LICENSE
23 PKG_BUILD_DEPENDS
:=golang
/host
27 GO_PKG
:=github.com
/nextdns
/nextdns
28 GO_PKG_LDFLAGS_X
:=main.version
=$(PKG_VERSION
)
30 include $(INCLUDE_DIR
)/package.mk
31 include ..
/..
/lang
/golang
/golang-package.mk
33 define Package
/nextdns
36 TITLE
:=NextDNS DNS over HTTPS Proxy
37 URL
:=https
://github.com
/nextdns
/nextdns
38 DEPENDS
:=$(GO_ARCH_DEPENDS
) +ca-bundle
41 define Package
/nextdns
/conffiles
45 define Package
/nextdns
/install
46 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
48 $(INSTALL_DIR
) $(1)/usr
/sbin
49 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nextdns
$(1)/usr
/sbin
/
51 $(INSTALL_DIR
) $(1)/etc
/config
52 $(INSTALL_CONF
) .
/files
/nextdns.config
$(1)/etc
/config
/nextdns
55 define Package
/nextdns
/postinst
57 if
[ -z
"$${IPKG_INSTROOT}" ]; then
62 define Package
/nextdns
/prerm
64 if
[ -z
"$${IPKG_INSTROOT}" ]; then
69 define Package
/nextdns
/description
70 Official NextDNS DNS over HTTPS Proxy.
73 define Package
/golang-github-nextdns-nextdns-dev
74 $(call Package
/nextdns
)
75 $(call GoPackage
/GoSubMenu
)
76 TITLE
+= (source files
)
80 define Package
/golang-github-nextdns-nextdns-dev
/description
81 $(call Package
/nextdns
/description
)
83 This package provides the source files for the client
/bridge program.
86 $(eval
$(call GoBinPackage
,nextdns
))
87 $(eval
$(call BuildPackage
,nextdns
))
88 $(eval
$(call GoSrcPackage
,golang-github-nextdns-nextdns-dev
))
89 $(eval
$(call BuildPackage
,golang-github-nextdns-nextdns-dev
))