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