1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- # Copyright (C) 2018-2019 Lienol
- #
- # This is free software, licensed under the Apache License, Version 2.0 .
- #
- include $(TOPDIR)/rules.mk
- PKG_NAME:=luci-app-adguardhome
- PKG_VERSION:=1.7
- PKG_RELEASE:=11
- PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
- include $(INCLUDE_DIR)/package.mk
- define Package/luci-app-adguardhome
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=3. Applications
- TITLE:=LuCI app for adguardhome
- PKG_MAINTAINER:=<https://github.com/rufengsuixing/luci-app-adguardhome>
- PKGARCH:=all
- DEPENDS:=
- endef
- define Package/luci-app-adguardhome/description
- LuCI support for adguardhome
- endef
- define Build/Prepare
- endef
- define Build/Compile
- endef
- define Package/luci-app-adguardhome/conffiles
- /etc/AdGuardHome.yaml
- /etc/config/AdGuardHome
- endef
- define Package/luci-app-adguardhome/install
- $(INSTALL_DIR) $(1)/usr/lib/lua/luci
- cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
- $(INSTALL_DIR) $(1)/
- cp -pR ./root/* $(1)/
- $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
- po2lmo ./po/zh-cn/AdGuardHome.po $(1)/usr/lib/lua/luci/i18n/AdGuardHome.zh-cn.lmo
- endef
- define Package/luci-app-adguardhome/postinst
- #!/bin/sh
- /etc/init.d/AdGuardHome enable >/dev/null 2>&1
- enable=$(uci get AdGuardHome.AdGuardHome.enabled)
- if [ "$enable"x == "1"x ]; then
- /etc/init.d/AdGuardHome start
- fi
- rm -f /tmp/luci-indexcache
- rm -f /tmp/luci-modulecache/*
- exit 0
- endef
- define Package/luci-app-adguardhome/prerm
- #!/bin/sh
- if [ -z "$${IPKG_INSTROOT}" ]; then
- /etc/init.d/AdGuardHome disable
- /etc/init.d/AdGuardHome stop
- fi
- exit 0
- endef
- $(eval $(call BuildPackage,luci-app-adguardhome))
|