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