1 2include $(TOPDIR)/rules.mk 3 4PKG_NAME:=appfilter 5PKG_VERSION:=5.0.2 6PKG_RELEASE:=1 7 8PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 9include $(INCLUDE_DIR)/package.mk 10 11define Package/appfilter 12 SECTION:=Derry Apps 13 CATEGORY:=Derry Apps 14 DEPENDS:=+libubox +libubus +libuci +libpthread +libjson-c +libblobmsg-json 15 TITLE:=App filter userspace module 16endef 17 18define Build/Prepare 19 mkdir -p $(PKG_BUILD_DIR) 20 cp -rf ./src/* $(PKG_BUILD_DIR) 21endef 22 23define Build/Compile 24 $(MAKE) -C $(PKG_BUILD_DIR)/ \ 25 CC="$(TARGET_CROSS)gcc" \ 26 CFLAGS="$(TARGET_CFLAGS)" \ 27 LIBS="$(TARGET_LDFLAGS) -lm -lpthread -lubox -luci -lubus -ljson-c -lblobmsg_json" \ 28 all 29endef 30 31 32define Build/Compile/Default 33 34endef 35 36define Package/appfilter/description 37 open appfilter app 38endef 39 40 41define Package/appfilter/install 42 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d 43 $(INSTALL_DIR) $(1)/etc/appfilter 44 $(INSTALL_DIR) $(1)/etc/config 45 $(CP) ./files/*.cfg $(1)/etc/appfilter/ 46 $(INSTALL_BIN) ./files/appfilter.init $(1)/etc/init.d/appfilter 47 $(INSTALL_BIN) ./files/oaf_rule $(1)/usr/bin 48 $(INSTALL_BIN) ./files/gen_class.sh $(1)/usr/bin 49 $(INSTALL_BIN) ./files/appfilter.config $(1)/etc/config/appfilter 50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/oafd $(1)/usr/bin 51endef 52 53 54$(eval $(call BuildPackage,appfilter)) 55 56