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.

68 lines
1.7 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=luci-app-privoxy
  3. PKG_VERSION:=1.0.1
  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-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) $(STAGING_DIR_HOST)/bin/po2lmo $(PKG_INSTALL_DIR)/build/po2lmo
  37. # generate needed .lmo files out of given .po files
  38. cd $(PKG_INSTALL_DIR); build/i18n-po2lua.pl po files/luasrc/i18n
  39. endef
  40. define Package/luci-app-privoxy/install
  41. $(INSTALL_DIR) $(1)/etc/uci-defaults
  42. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/files/root/etc/uci-defaults/* $(1)/etc/uci-defaults
  43. $(INSTALL_DIR) $(1)/usr/lib/lua/luci
  44. $(CP) $(PKG_INSTALL_DIR)/files/luasrc/* $(1)/usr/lib/lua/luci
  45. endef
  46. define Package/luci-app-privoxy/postinst
  47. #!/bin/sh
  48. [ -z "$${IPKG_INSTROOT}" ] && {
  49. /etc/uci-defaults/luci-privoxy && rm -f /etc/uci-defaults/luci-privoxy
  50. }
  51. exit 0
  52. endef
  53. $(eval $(call BuildPackage,luci-app-privoxy))