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.

72 lines
2.0 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.106.3
  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:=bdf5ad833df90969cd82b9fb6a91846338c738ed01671fc768d867b592102f7c
  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_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. endef
  40. define Package/adguardhome/description
  41. Free and open source, powerful network-wide ads and trackers blocking DNS server.
  42. endef
  43. define Build/Compile
  44. ( \
  45. pushd $(PKG_BUILD_DIR) ; \
  46. make js-deps js-build ; \
  47. packr -z -v -i internal ; \
  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. endef
  57. $(eval $(call GoBinPackage,adguardhome))
  58. $(eval $(call BuildPackage,adguardhome))