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.

75 lines
2.1 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.107.5
  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:=5282d58b1a8d52f02af4ab7a5d6089aba6f7d20929bd49fd844c930110262dcb
  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
  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_BUILD_TIME:=$(shell date -d @$(SOURCE_DATE_EPOCH) +%FT%TZ%z)
  22. AGH_VERSION_PKG:=github.com/AdguardTeam/AdGuardHome/internal/version
  23. GO_PKG_LDFLAGS_X:=$(AGH_VERSION_PKG).channel=release \
  24. $(AGH_VERSION_PKG).version=$(PKG_SOURCE_VERSION) \
  25. $(AGH_VERSION_PKG).buildtime=$(AGH_BUILD_TIME) \
  26. $(AGH_VERSION_PKG).goarm=$(GO_ARM) \
  27. $(AGH_VERSION_PKG).gomips=$(GO_MIPS)
  28. include $(INCLUDE_DIR)/package.mk
  29. include ../../lang/golang/golang-package.mk
  30. define Package/adguardhome
  31. SECTION:=net
  32. CATEGORY:=Network
  33. TITLE:=Network-wide ads and trackers blocking DNS server
  34. URL:=https://github.com/AdguardTeam/AdGuardHome
  35. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  36. endef
  37. define Package/adguardhome/conffiles
  38. /etc/adguardhome.yaml
  39. /etc/config/adguardhome
  40. endef
  41. define Package/adguardhome/description
  42. Free and open source, powerful network-wide ads and trackers blocking DNS server.
  43. endef
  44. define Build/Compile
  45. ( \
  46. pushd $(PKG_BUILD_DIR) ; \
  47. make js-deps js-build ; \
  48. popd ; \
  49. $(call GoPackage/Build/Compile) ; \
  50. )
  51. endef
  52. define Package/adguardhome/install
  53. $(call GoPackage/Package/Install/Bin,$(1))
  54. $(INSTALL_DIR) $(1)/etc/init.d
  55. $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome
  56. $(INSTALL_DIR) $(1)/etc/config
  57. $(INSTALL_DATA) ./files/adguardhome.config $(1)/etc/config/adguardhome
  58. endef
  59. $(eval $(call GoBinPackage,adguardhome))
  60. $(eval $(call BuildPackage,adguardhome))