aboutsummaryrefslogtreecommitdiffstats
path: root/main/tinyproxy/APKBUILD
blob: 1ce0c08ade255e7f7ed6675b8d9c8f0a9e8ee5d1 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=tinyproxy
pkgver=1.8.3
pkgrel=0
pkgdesc="Lightweight HTTP proxy"
pkgusers="tinyproxy"
pkggroups="tinyproxy"
url="https://www.banu.com/tinyproxy/"
arch="all"
license="GPL"
depends=
makedepends="wget asciidoc"
install="tinyproxy.pre-install"
subpackages="$pkgname-doc"
source="https://www.banu.com/pub/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
	tinyproxy.initd
	"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"

	# 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 --prefix=/usr \
		--sysconfdir=/etc/tinyproxy \
		--disable-dependency-tracking \
		|| return
	make || return 1
}

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

md5sums="292ac51da8ad6ae883d4ebf56908400d  tinyproxy-1.8.3.tar.bz2
ce2b2e3c79fa0e8491fe625bbb15710a  tinyproxy.initd"