### this file is sourced not run
PKGVER=3.0.26
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=privoxy-$PKGVER-stable-src.tar.gz
MD5SUM=8a1c842112ccea68c19b7ceb4a0e999f
SRC_URL=http://downloads.sourceforge.net/ijbswa/$TARBALL
BUNDLE=

SLACKREQ=''
SLACKDESC="privoxy: privoxy $PKGVER (Privacy-enhancing web proxy)  
privoxy:  
privoxy: Privoxy is a non-caching web proxy with advanced filtering 
privoxy: capabilities for enhancing privacy, modifying web page data and HTTP 
privoxy: headers, controlling access, and removing ads and other obnoxious 
privoxy: Internet junk. 
privoxy: 
privoxy: Comes with privoxy-blocklist.sh to automatically pull and convert 
privoxy: blocklist from Adblock list (EasyList setup by default).
privoxy: 
privoxy: http://www.privoxy.org/  
"
SLACKINSTALL='privoxy-blocklist.sh' # run so it will generate its config-file

### default pkg_download
### default pkg_prepare
### package
pkg_package() { # add init script
	mkdir -p etc/init.d &&
	rm -f etc/init.d/privoxy && # use ours instead
	cp $CHROOT_DIR/tmp/pkg/91-privoxy etc/init.d &&
	cp $CHROOT_DIR/tmp/pkg/privoxy-blocklist.sh usr/sbin
}

### build
pkg_build() {	
	# users
	echo "webuser:x:504:504:webuser:/root/Web-Server:/bin/sh" >> /etc/passwd &&
	echo "webgroup:x:504" >> /etc/group &&
	
	cd /tmp/privoxy* &&
	autoreconf -fiv &&
	CONFFLAGS="$CONFFLAGS --sysconfdir=/etc/privoxy \
	    --with-user=webuser --with-group=webgroup"
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	rm -f /etc/passwd /etc/group 
}
  

