09103ef00bb510312c25f44ea61f24a5235024c3
[packages.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:=1
14 PKG_MD5SUM:=b0710be8af09409bfb03f52523a17010
15
16 PKG_SOURCE_URL:=@SF/ijbswa
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable-src.tar.gz
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
29   TITLE:=web proxy with advanced filtering capabilities
30   DESCRIPTION:=Privoxy is a web proxy with advanced filtering capabilities for\\\
31         protecting privacy, modifying web page content, managing cookies,\\\
32         controlling access, and removing ads, banners, pop-ups and other\\\
33         obnoxious Internet junk. Privoxy has a very flexible configuration\\\
34         and can be customized to suit individual needs and tastes. Privoxy\\\
35         has application for both stand-alone systems and multi-user networks.\\\
36   URL:=http://www.privoxy.org/
37 endef
38
39 define Build/Configure
40   (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
41                 autoheader && autoconf && \
42                 $(TARGET_CONFIGURE_OPTS) \
43                 CFLAGS="$(strip $(TARGET_CFLAGS))" \
44                 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
45                 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
46                 ./configure \
47                   --target=$(GNU_TARGET_NAME) \
48                   --host=$(GNU_TARGET_NAME) \
49                   --build=$(GNU_HOST_NAME) \
50                   --program-prefix="" \
51                   --program-suffix="" \
52                   --prefix=/usr \
53                   --exec-prefix=/usr \
54                   --bindir=/usr/bin \
55                   --datadir=/usr/share \
56                   --includedir=/usr/include \
57                   --infodir=/usr/share/info \
58                   --libdir=/usr/lib \
59                   --libexecdir=/usr/lib \
60                   --localstatedir=/var \
61                   --mandir=/usr/share/man \
62                   --sbindir=/usr/sbin \
63                   --sysconfdir=/etc \
64                   $(DISABLE_NLS) \
65                   --disable-static \
66         );
67 endef
68
69 define Build/Compile    
70         $(MAKE) -C $(PKG_BUILD_DIR) \
71                 SPECIAL_CFLAGS="-pthread -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
72         mkdir -p $(PKG_INSTALL_DIR)
73         $(MAKE) -C $(PKG_BUILD_DIR) \
74                 DESTDIR="$(PKG_INSTALL_DIR)" \
75                 install
76 endef
77
78 define Package/privoxy/install  
79         install -d -m0755 $(1)/usr/sbin $(1)/etc/privoxy 
80         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/privoxy $(1)/usr/sbin/
81 endef
82
83 $(eval $(call BuildPackage,privoxy))