aboutsummaryrefslogtreecommitdiffstats
path: root/main/tinyproxy/APKBUILD
blob: 0191ed7aeeede5bf9515436893659ed9fa83a119 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=tinyproxy
pkgver=1.10.0
pkgrel=2
pkgdesc="Lightweight HTTP proxy"
pkgusers="tinyproxy"
pkggroups="tinyproxy"
url="https://www.banu.com/tinyproxy/"
arch="all"
license="GPL-2.0-or-later"
depends=
makedepends="asciidoc"
install="tinyproxy.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://github.com/$pkgname/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
	tinyproxy.initd"

builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	default_prepare
	# 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 "/run/tinyproxy/tinyproxy.pid":' \
		etc/tinyproxy.conf.in
}

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

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

sha512sums="53187adef865672a6c29f126189cf896bd02f8b0789ee2ee00b82d93b952c70dacdd2c82b0845392e518560e75e6ee107ce7662d1ec71108f293ba1d7de6aa2a  tinyproxy-1.10.0.tar.gz
cd440ed686e8128ed46441ca29da8376c4d28e9e34ae9b85c18eb2f1681d60c0c04b79401a7368f917eeab6768965d6c867d0ac6578a7858557c11b356446c02  tinyproxy.initd"