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
15 PKG_SOURCE_VERSION
:=v
$(PKG_VERSION
)
16 PKG_SOURCE_URL
:=https
://github.com
/nextdns
/nextdns.git
17 PKG_MIRROR_HASH
:=112bf0898cd355d0795d36ab0cd5590f44490b382e6e874bf63e8c66f2b49acb
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
29 GO_PKG_LDFLAGS_X
:=main.version
=$(PKG_VERSION
)
31 include $(INCLUDE_DIR
)/package.mk
32 include ..
/..
/lang
/golang
/golang-package.mk
34 define Package
/nextdns
37 TITLE
:=NextDNS DNS over HTTPS Proxy
38 URL
:=https
://github.com
/nextdns
/nextdns
39 DEPENDS
:=$(GO_ARCH_DEPENDS
) +ca-bundle
42 define Package
/nextdns
/conffiles
46 define Package
/nextdns
/install
47 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
49 $(INSTALL_DIR
) $(1)/usr
/sbin
50 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/nextdns
$(1)/usr
/sbin
/
52 $(INSTALL_DIR
) $(1)/etc
/config
53 $(INSTALL_CONF
) .
/files
/nextdns.config
$(1)/etc
/config
/nextdns
56 define Package
/nextdns
/postinst
58 if
[ -z
"$${IPKG_INSTROOT}" ]; then
63 define Package
/nextdns
/prerm
65 if
[ -z
"$${IPKG_INSTROOT}" ]; then
70 define Package
/nextdns
/description
71 Official NextDNS DNS over HTTPS Proxy.
74 define Package
/golang-github-nextdns-nextdns-dev
75 $(call Package
/nextdns
)
76 $(call GoPackage
/GoSubMenu
)
77 TITLE
+= (source files
)
81 define Package
/golang-github-nextdns-nextdns-dev
/description
82 $(call Package
/nextdns
/description
)
84 This package provides the source files for the client
/bridge program.
87 $(eval
$(call GoBinPackage
,nextdns
))
88 $(eval
$(call BuildPackage
,nextdns
))
89 $(eval
$(call GoSrcPackage
,golang-github-nextdns-nextdns-dev
))
90 $(eval
$(call BuildPackage
,golang-github-nextdns-nextdns-dev
))