summaryrefslogtreecommitdiffstats
path: root/main/tinyproxy/APKBUILD
blob: 63f03ec23d34f7d32d0d02ea1905608d3bcea642 (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
58
59
60
61
62
63
64
65
66
67
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=tinyproxy
pkgver=1.8.3
pkgrel=4
pkgdesc="Lightweight HTTP proxy"
pkgusers="tinyproxy"
pkggroups="tinyproxy"
url="https://www.banu.com/tinyproxy/"
arch="all"
license="GPL"
depends=
makedepends="asciidoc"
install="tinyproxy.pre-install"
subpackages="$pkgname-doc"
source="https://www.banu.com/pub/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
	limit_headers.patch
	tinyproxy.initd
	"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	# set default user to tinyproxy:tinyproxy and correct pidfile
	sed -i -e 's:^User.*:User tinyproxy:' \
		-e 's:^Group.*:Group tinyproxy:' \
		-e 's:^PidFile.*:PidFile "/var/run/tinyproxy/tinyproxy.pid":' \
		etc/tinyproxy.conf.in
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--localstatedir=/var \
		--sysconfdir=/etc/tinyproxy \
		--disable-dependency-tracking \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -d -D -o tinyproxy -g tinyproxy "$pkgdir"/var/run/tinyproxy
	install -d -D -o tinyproxy -g tinyproxy "$pkgdir"/var/log/tinyproxy
	install -Dm755 "$srcdir"/tinyproxy.initd "$pkgdir"/etc/init.d/tinyproxy
}

md5sums="292ac51da8ad6ae883d4ebf56908400d  tinyproxy-1.8.3.tar.bz2
cf72d2503f6415079c4702853d467ea8  limit_headers.patch
9c6df6fa8eb85558e46cf66b96820807  tinyproxy.initd"
sha256sums="be559b54eb4772a703ad35239d1cb59d32f7cf8a739966742622d57df88b896e  tinyproxy-1.8.3.tar.bz2
b56d6aa51071da6888d30b3b842afa224ac858d740558b37d0af0183985dad5d  limit_headers.patch
19e768a03f28b67b61e882441788b2f3af71c4702e8b88e4ad194968c7a5c812  tinyproxy.initd"
sha512sums="69f1262b39d37f44a42621a0d25985632cdb790c8d9b49335a49a68c0f5237b97b111252856cba119895ac066770645560d2d7cd2de31f02103fa55fb4b3290c  tinyproxy-1.8.3.tar.bz2
6542b72488ad4488db9b6a67d197c11576102ebd168fbd3ebf4f8c6cd18ce550f0cc108517897b7a294539a522ce4d3544964b5c82031a2aa1a8de682378b7ef  limit_headers.patch
7b63dcc2369bba23cb65d9913af78ec0b26437874bf33dabeba5728755c224d3fc612802ab354ecd0d757faa679ce3545fc5d5413c64ddeab60313f4c7d139a2  tinyproxy.initd"