diff --git a/luci-app-oaf/Makefile b/luci-app-oaf/Makefile index 5d89424c..f1e22923 100755 --- a/luci-app-oaf/Makefile +++ b/luci-app-oaf/Makefile @@ -1,15 +1,55 @@ - # -# This is free software, licensed under the Apache License, Version 2.0 . +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. # include $(TOPDIR)/rules.mk -LUCI_TITLE:=Open App Filter Module -LUCI_PKGARCH:=all -LUCI_DEPENDS:=+kmod-oaf +appfilter PKG_NAME:=luci-app-oaf PKG_VERSION:=1.0 PKG_RELEASE:=1 -include $(TOPDIR)/feeds/luci/luci.mk -# call BuildPackage - OpenWrt buildroot signature + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/luci-app-oaf + SECTION:=Derry Apps + CATEGORY:=Derry Apps + TITLE:=LuCI Support for oaf + PKGARCH:=all + DEPENDS:=+kmod-oaf +endef + +define Package/luci-app-oaf/description + LuCI Support for oaf. +endef + +define Build/Prepare +endef + +define Build/Compile +endef + +define Package/luci-app-oaf/postinst +#!/bin/sh +if [ -z "$$IPKG_INSTROOT" ]; then + ( . /etc/uci-defaults/91_luci-app-oaf ) + rm -f /etc/uci-defaults/91_luci-app-oaf + + rm -rf /tmp/luci-indexcache /tmp/luci-modulecache +fi + +exit 0 +endef + +define Package/luci-app-oaf/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/oaf.po $(1)/usr/lib/lua/luci/i18n/oaf.zh-cn.lmo +endef + +$(eval $(call BuildPackage,luci-app-oaf)) diff --git a/luci-app-oaf/luasrc/controller/appfilter.lua b/luci-app-oaf/luasrc/controller/appfilter.lua index f9ff51eb..3f672718 100755 --- a/luci-app-oaf/luasrc/controller/appfilter.lua +++ b/luci-app-oaf/luasrc/controller/appfilter.lua @@ -7,6 +7,6 @@ function index() local page - page = entry({"admin", "network", "appfilter"}, cbi("appfilter/appfilter"), _("appfilter")) + page = entry({"admin", "services", "appfilter"}, cbi("appfilter/appfilter"), _("appfilter")) page.dependent = true end diff --git a/open-app-filter/files/feature.cfg b/luci-app-oaf/root/etc/appfilter/feature.cfg similarity index 100% rename from open-app-filter/files/feature.cfg rename to luci-app-oaf/root/etc/appfilter/feature.cfg diff --git a/open-app-filter/files/appfilter.config b/luci-app-oaf/root/etc/config/appfilter similarity index 100% rename from open-app-filter/files/appfilter.config rename to luci-app-oaf/root/etc/config/appfilter diff --git a/open-app-filter/files/appfilter.init b/luci-app-oaf/root/etc/init.d/appfilter similarity index 100% rename from open-app-filter/files/appfilter.init rename to luci-app-oaf/root/etc/init.d/appfilter diff --git a/luci-app-oaf/root/etc/uci-defaults/91_luci-oaf b/luci-app-oaf/root/etc/uci-defaults/91_luci-app-oaf similarity index 100% rename from luci-app-oaf/root/etc/uci-defaults/91_luci-oaf rename to luci-app-oaf/root/etc/uci-defaults/91_luci-app-oaf diff --git a/open-app-filter/files/appfilter.sh b/luci-app-oaf/root/usr/bin/appfilter.sh similarity index 100% rename from open-app-filter/files/appfilter.sh rename to luci-app-oaf/root/usr/bin/appfilter.sh diff --git a/open-app-filter/files/gen_class.sh b/luci-app-oaf/root/usr/bin/gen_class.sh similarity index 100% rename from open-app-filter/files/gen_class.sh rename to luci-app-oaf/root/usr/bin/gen_class.sh diff --git a/open-app-filter/Makefile b/open-app-filter/Makefile deleted file mode 100755 index a9a495dc..00000000 --- a/open-app-filter/Makefile +++ /dev/null @@ -1,46 +0,0 @@ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=appfilter -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - - -include $(INCLUDE_DIR)/package.mk -#include $(INCLUDE_DIR)/kernel.mk - -define Package/appfilter - SECTION:=Derry Apps - CATEGORY:=Derry Apps - TITLE:=App filter userspace module -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Compile/Default - -endef - -define Package/appfilter/description - open appfilter app -endef - - -define Package/appfilter/install - echo "install" - $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d - $(INSTALL_DIR) $(1)/etc/appfilter - $(INSTALL_DIR) $(1)/etc/config - $(CP) ./files/feature.cfg $(1)/etc/appfilter/ - $(INSTALL_BIN) ./files/appfilter.init $(1)/etc/init.d/appfilter - $(INSTALL_BIN) ./files/appfilter.sh $(1)/usr/bin - $(INSTALL_BIN) ./files/gen_class.sh $(1)/usr/bin - $(INSTALL_BIN) ./files/appfilter.config $(1)/etc/config/appfilter -endef - - -$(eval $(call BuildPackage,appfilter)) -