aboutsummaryrefslogtreecommitdiffstats
path: root/main/privoxy/APKBUILD
blob: f517834c9959881da42448eacb0ae340a86c5cca (plain) (blame)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=privoxy
pkgver=3.0.32
pkgrel=0
pkgdesc="web proxy with advanced filtering capabilities"
url="https://www.privoxy.org/"
arch="all"
license="GPL-2.0-or-later"
pkgusers="privoxy"
pkggroups="privoxy"
makedepends="autoconf automake pcre-dev zlib-dev coreutils"
install="privoxy.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://downloads.sourceforge.net/ijbswa/privoxy-$pkgver-stable-src.tar.gz
	$pkgname.initd
	$pkgname.logrotate
	privoxy-alpine.patch
	"
options="!check" # No test suite
builddir="$srcdir/$pkgname-$pkgver-stable"

# secfixes:
#   3.0.32-r0:
#     - CVE-2021-20272
#     - CVE-2021-20273
#     - CVE-2021-20274
#     - CVE-2021-20275
#     - CVE-2021-20276
#   3.0.31-r0:
#     - CVE-2021-20216
#     - CVE-2021-20217
#   3.0.29-r0:
#     - CVE-2021-20210
#     - CVE-2021-20211
#     - CVE-2021-20212
#     - CVE-2021-20213
#     - CVE-2021-20214
#     - CVE-2021-20215

prepare() {
	update_config_sub
	default_prepare

	aclocal && autoheader && autoconf
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--localstatedir=/var/ \
		--enable-zlib \
		--enable-dynamic-pcre \
		--with-user=privoxy \
		--with-group=privoxy \
		--sysconfdir=/etc/privoxy \
		--docdir=/usr/share/doc/$pkgname
	make
}

package() {
	make DESTDIR="$pkgdir" install

	rm -f "$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 -exec chmod 770 {} \;
	find "$pkgdir"/etc/privoxy/ -type f -exec chmod 660 {} \;

	chown -R privoxy:privoxy "$pkgdir"/var/log/privoxy \
		"$pkgdir"/etc/privoxy
}

sha512sums="da41c0045bf593219df64718645eff984b5df43737811cc0fa12fce7e8ae1ab59eefbe20f23d6ce8f62216cfd81f1a9c319688d15693c25eed36010f3e1d5ffd  privoxy-3.0.32-stable-src.tar.gz
346bda3a2108547569af3397c77e092c54fa0c20bc6d3bb1d4c202b4e2b8d9c13018eab0a326cd9632310ec8052600ee7db4b6011610faec386c399cdd01af9c  privoxy.initd
118caaeac3aba751584c5bdfc737bf5bfeddf1a62fda1f44bcd4654ae2e33183bc1ce6fc66d4a1bdd79766e42e669b1615a6d46d528a1bd49cabdf98385a3bb9  privoxy.logrotate
1059feed20a31d7d2b5d1f44b7b1af40373d87dbd9e7e83c8998ac1b4e27dfbfdfeb6a9ea7934e15d0c14fed1fd03fb63d2ec8d2a6b53e5884a21dc8df4828fc  privoxy-alpine.patch"