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.

69 lines
1.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=luci-app-privoxy
  3. PKG_VERSION:=1.0.0
  4. #PKG_RELEASE:=0
  5. PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
  6. PKG_LICENSE:=GPL-2.0
  7. PKG_LICENSE_FILES:=LICENSE
  8. PKG_BUILD_DIR:= $(BUILD_DIR)/$(PKG_NAME)
  9. # needed inside Build/Compile
  10. # po2lmo is compiled inside luci-base
  11. PKG_BUILD_DEPENDS:=+luci-base
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/luci-app-privoxy
  14. SECTION:=luci
  15. CATEGORY:=LuCI
  16. SUBMENU:=3. Applications
  17. TITLE:=LuCI support for Privoxy WEB Proxy
  18. DEPENDS:=+luci-lib-nixio +luci-mod-admin-full +privoxy
  19. PKGARCH:=all
  20. endef
  21. define Package/luci-app-privoxy/description
  22. LuCi web interface for Privoxy WEB Proxy
  23. Version: $(PKG_VERSION)
  24. endef
  25. define Build/Prepare
  26. # do nothing
  27. endef
  28. define Build/Configure
  29. # do nothing
  30. endef
  31. define Build/Compile
  32. mkdir -p $(PKG_INSTALL_DIR)/build $(PKG_INSTALL_DIR)/files $(PKG_INSTALL_DIR)/po
  33. # copy everthing we need ot PKG_INSTALL_DIR
  34. $(CP) ./* $(PKG_INSTALL_DIR)/
  35. # due to package dependencies LuCI is compiled first so the needed binary exists
  36. $(LN) $(BUILD_DIR)/luci/build/po2lmo $(PKG_INSTALL_DIR)/build/po2lmo
  37. $(LN) $(BUILD_DIR)/luci/build/i18n-po2lua.pl $(PKG_INSTALL_DIR)/build/i18n-po2lua.pl
  38. # generate needed .lmo files out of given .po files
  39. cd $(PKG_INSTALL_DIR); build/i18n-po2lua.pl po files/luasrc/i18n
  40. endef
  41. define Package/luci-app-privoxy/install
  42. $(INSTALL_DIR) $(1)/etc/uci-defaults
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/files/root/etc/uci-defaults/* $(1)/etc/uci-defaults
  44. $(INSTALL_DIR) $(1)/usr/lib/lua/luci
  45. $(CP) $(PKG_INSTALL_DIR)/files/luasrc/* $(1)/usr/lib/lua/luci
  46. endef
  47. define Package/luci-app-privoxy/postinst
  48. #!/bin/sh
  49. [ -z "$${IPKG_INSTROOT}" ] && {
  50. /etc/uci-defaults/luci-privoxy && rm -f /etc/uci-defaults/luci-privoxy
  51. }
  52. exit 0
  53. endef
  54. $(eval $(call BuildPackage,luci-app-privoxy))