You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.9 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=adguardhome
  7. PKG_VERSION:=0.105.2
  8. PKG_RELEASE:=1
  9. PKG_SOURCE_PROTO:=git
  10. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  11. PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
  12. PKG_MIRROR_HASH:=c2ca02ef4d91250772567994e4a59962dc4ec559f44771cefba2b0663668fba1
  13. PKG_LICENSE:=GPL-3.0-only
  14. PKG_LICENSE_FILES:=LICENSE.txt
  15. PKG_MAINTAINER:=Dobroslaw Kijowski <dobo90@gmail.com>
  16. PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host packr/host
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_USE_MIPS16:=0
  19. GO_PKG:=github.com/AdguardTeam/AdGuardHome
  20. GO_PKG_BUILD_PKG:=github.com/AdguardTeam/AdGuardHome
  21. AGH_VERSION_PKG:=github.com/AdguardTeam/AdGuardHome/internal/version
  22. GO_PKG_LDFLAGS_X:=$(AGH_VERSION_PKG).channel=release \
  23. $(AGH_VERSION_PKG).version=$(PKG_SOURCE_VERSION) \
  24. $(AGH_VERSION_PKG).goarm=$(GO_ARM) \
  25. $(AGH_VERSION_PKG).gomips=$(GO_MIPS)
  26. include $(INCLUDE_DIR)/package.mk
  27. include ../../lang/golang/golang-package.mk
  28. define Package/adguardhome
  29. SECTION:=net
  30. CATEGORY:=Network
  31. TITLE:=Network-wide ads and trackers blocking DNS server
  32. URL:=https://github.com/AdguardTeam/AdGuardHome
  33. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  34. endef
  35. define Package/adguardhome/conffiles
  36. /etc/adguardhome.yaml
  37. endef
  38. define Package/adguardhome/description
  39. Free and open source, powerful network-wide ads and trackers blocking DNS server.
  40. endef
  41. define Build/Compile
  42. ( \
  43. pushd $(PKG_BUILD_DIR) ; \
  44. make js-deps js-build ; \
  45. packr -z -v -i internal ; \
  46. popd ; \
  47. $(call GoPackage/Build/Compile) ; \
  48. )
  49. endef
  50. define Package/adguardhome/install
  51. $(call GoPackage/Package/Install/Bin,$(1))
  52. $(INSTALL_DIR) $(1)/etc/init.d
  53. $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome
  54. endef
  55. $(eval $(call GoBinPackage,adguardhome))
  56. $(eval $(call BuildPackage,adguardhome))