Various privoxy fixes:
[openwrt/svn-archive/archive.git] / net / privoxy / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=privoxy
12 PKG_VERSION:=3.0.3
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable-src.tar.gz
16 PKG_SOURCE_URL:=@SF/ijbswa
17 PKG_MD5SUM:=b0710be8af09409bfb03f52523a17010
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-stable
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/privoxy
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libpcre +libpthread
29 TITLE:=web proxy with advanced filtering capabilities
30 DESCRIPTION:=\
31 Privoxy is a web proxy with advanced filtering capabilities for \\\
32 protecting privacy, modifying web page content, managing cookies, \\\
33 controlling access, and removing ads, banners, pop-ups and other \\\
34 obnoxious Internet junk. Privoxy has a very flexible configuration \\\
35 and can be customized to suit individual needs and tastes. Privoxy \\\
36 has application for both stand-alone systems and multi-user networks.
37 URL:=http://www.privoxy.org/
38 endef
39
40 define Build/Configure
41 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
42 autoheader && autoconf \
43 );
44 $(call Build/Configure/Default, \
45 --sysconfdir=/etc/privoxy \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 SPECIAL_CFLAGS="-pthread -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
52 mkdir -p $(PKG_INSTALL_DIR)
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 DESTDIR="$(PKG_INSTALL_DIR)" \
55 install
56 endef
57
58 define Package/privoxy/conffiles
59 /etc/privoxy/config
60 /etc/privoxy/user.action
61 endef
62
63 define Package/privoxy/install
64 $(INSTALL_DIR) $(1)/usr/sbin
65 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/privoxy $(1)/usr/sbin/
66 $(INSTALL_DIR) $(1)/etc/privoxy
67 $(CP) $(PKG_INSTALL_DIR)/etc/privoxy/* $(1)/etc/privoxy/
68 $(INSTALL_CONF) ./files/privoxy.config $(1)/etc/privoxy/config
69 $(INSTALL_DIR) $(1)/etc/init.d
70 $(INSTALL_BIN) ./files/privoxy.init $(1)/etc/init.d/privoxy
71 endef
72
73 $(eval $(call BuildPackage,privoxy))