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.

66 lines
1.7 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.104.1
  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:=3abbbf0531fd991a96dc2ea32aaaa9ab65dee5f40bb71e5939ddd068bbb17f7c
  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 packr/host
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_USE_MIPS16:=0
  19. GO_PKG:=github.com/AdguardTeam/AdGuardHome
  20. GO_PKG_EXCLUDES:=dhcpd/standalone
  21. GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION) main.channel=release main.goarm=$(GO_ARM)
  22. include $(INCLUDE_DIR)/package.mk
  23. include ../../lang/golang/golang-package.mk
  24. define Package/adguardhome
  25. SECTION:=net
  26. CATEGORY:=Network
  27. TITLE:=Network-wide ads and trackers blocking DNS server
  28. URL:=https://github.com/AdguardTeam/AdGuardHome
  29. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  30. endef
  31. define Package/adguardhome/conffiles
  32. /etc/adguardhome.yaml
  33. endef
  34. define Package/adguardhome/description
  35. Free and open source, powerful network-wide ads and trackers blocking DNS server.
  36. endef
  37. define Build/Compile
  38. ( \
  39. pushd $(PKG_BUILD_DIR) ; \
  40. npm --prefix client ci ; \
  41. npm --prefix client run build-prod ; \
  42. packr -z -v -i internal ; \
  43. popd ; \
  44. $(call GoPackage/Build/Compile) ; \
  45. )
  46. endef
  47. define Package/adguardhome/install
  48. $(call GoPackage/Package/Install/Bin,$(1))
  49. $(INSTALL_DIR) $(1)/etc/init.d
  50. $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome
  51. endef
  52. $(eval $(call GoBinPackage,adguardhome))
  53. $(eval $(call BuildPackage,adguardhome))