aboutsummaryrefslogtreecommitdiffstats
path: root/main/privoxy/APKBUILD
blob: c6a92ebe2071c9376da24baa1c1c4564f9594044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=privoxy
pkgver=3.0.17
pkgrel=1
pkgdesc="A web proxy with advanced filtering capabilities"
url="http://www.privoxy.org"
arch="all"
license="GPL"
pkgusers="privoxy"
pkggroups="privoxy"
depends=
makedepends="autoconf automake pcre-dev zlib-dev coreutils"
install="privoxy.pre-install"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/ijbswa/$pkgname-$pkgver-stable-src.tar.gz
	$pkgname.initd
	$pkgname.logrotate
	privoxy-3.0.16-gentoo.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver-stable
prepare() {
	cd "$_builddir"
	patch -p1 -i "$srcdir"/privoxy-3.0.16-gentoo.patch || return 1
	aclocal && autoheader && autoconf
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--localstatedir=/var/ \
		--enable-zlib \
		--enable-dynamic-pcre \
		--with-user=privoxy \
		--with-group=privoxy \
		--sysconfdir=/etc/privoxy \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	rm $pkgdir/var/log/privoxy/*
	install -D -m755 "$srcdir"/privoxy.initd "$pkgdir"/etc/init.d/privoxy
	install -D -m644 "$srcdir"/privoxy.logrotate \
		"$pkgdir"/etc/logrotate.d/privoxy
	find "$pkgdir"/etc/privoxy/ -type d | xargs chmod 770
	find "$pkgdir"/etc/privoxy/ -type f | xargs chmod 660
	chown -R privoxy:privoxy "$pkgdir"/var/log/privoxy \
		"$pkgdir"/etc/privoxy
}

md5sums="9d363d738a3f3d73e774d6dfeafdb15f  privoxy-3.0.17-stable-src.tar.gz
170d5679e4c3504f07ef1a4c9859e9b8  privoxy.initd
f2b6a652dbfbc65e5b89024a8ea3da7e  privoxy.logrotate
48cce19ecdcf8f17a021ac3aa8f837bc  privoxy-3.0.16-gentoo.patch"