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.

109 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=privoxy
  9. PKG_VERSION:=3.0.23
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=privoxy-$(PKG_VERSION)-stable-src.tar.gz
  12. PKG_SOURCE_URL:=@SF/ijbswa
  13. PKG_MD5SUM:=bbe47d5ff1a54d9f9fc93a160532697f
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/privoxy-$(PKG_VERSION)-stable
  15. PKG_FIXUP:=autoreconf
  16. PKG_INSTALL:=1
  17. PKG_LICENSE:=GPL-2.0
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_MAINTAINER:=christian.schoenebeck@gmail.com
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/$(PKG_NAME)
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Web Servers/Proxies
  25. DEPENDS:=+libpcre +libpthread +zlib
  26. TITLE:=Privoxy WEB Proxy
  27. URL:=http://www.privoxy.org/
  28. USERID:=privoxy=8118:privoxy=8118
  29. endef
  30. # shown in LuCI package description
  31. define Package/$(PKG_NAME)/description
  32. $(TITLE) - Homepage: www.privoxy.org
  33. endef
  34. # shown in make menuconfig <Help>
  35. define Package/$(PKG_NAME)/config
  36. help
  37. Privoxy is a web proxy with advanced filtering capabilities for protecting
  38. privacy, modifying web page content, managing cookies, controlling access,
  39. and removing ads, banners, pop-ups and other obnoxious Internet junk.
  40. Privoxy has a very flexible configuration and can be customized to suit
  41. individual needs and tastes.
  42. Privoxy has application for both stand-alone systems and multi-user networks.
  43. Run as : $(USERID)
  44. Version: $(PKG_VERSION)-$(PKG_RELEASE)
  45. Home : $(URL)
  46. $(PKG_MAINTAINER)
  47. endef
  48. CONFIGURE_ARGS += \
  49. --sysconfdir=/etc/privoxy
  50. # needed otherwise errors during compile
  51. MAKE_FLAGS:=
  52. define Package/$(PKG_NAME)/conffiles
  53. /etc/config/privoxy
  54. /etc/privoxy/user.action
  55. /etc/privoxy/user.filter
  56. /etc/privoxy/user.trust
  57. endef
  58. define Package/$(PKG_NAME)/preinst
  59. #!/bin/sh
  60. [ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit
  61. # stop service if PKG_UPGRADE
  62. [ "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/privoxy stop >/dev/null 2>&1
  63. exit 0 # supress errors from stop command
  64. endef
  65. define Package/$(PKG_NAME)/install
  66. if [ -f $(PKG_INSTALL_DIR)/etc/privoxy/trust ]; then \
  67. mv -f $(PKG_INSTALL_DIR)/etc/privoxy/trust $(PKG_INSTALL_DIR)/etc/privoxy/user.trust; \
  68. fi
  69. if [ -f $(PKG_INSTALL_DIR)/etc/privoxy/config ]; then \
  70. rm -f $(PKG_INSTALL_DIR)/etc/privoxy/config; \
  71. fi
  72. $(INSTALL_DIR) \
  73. $(1)/usr/sbin\
  74. $(1)/etc/privoxy/templates
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/privoxy $(1)/usr/sbin/
  76. find $(PKG_INSTALL_DIR)/etc/privoxy/templates -maxdepth 1 -type f \
  77. -exec $(INSTALL_DATA) -t $(1)/etc/privoxy/templates {} \;
  78. find $(PKG_INSTALL_DIR)/etc/privoxy -maxdepth 1 -type f \
  79. -exec install -m0664 -t $(1)/etc/privoxy {} \;
  80. $(INSTALL_DIR) \
  81. $(1)/etc/init.d \
  82. $(1)/etc/hotplug.d/iface \
  83. $(1)/etc/config
  84. $(INSTALL_BIN) ./files/privoxy.init $(1)/etc/init.d/privoxy
  85. $(INSTALL_BIN) ./files/privoxy.hotplug $(1)/etc/hotplug.d/iface/80-privoxy
  86. $(INSTALL_CONF) ./files/privoxy.config $(1)/etc/config/privoxy
  87. endef
  88. $(eval $(call BuildPackage,$(PKG_NAME)))