summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 024319d6b3baf14575672b84d7b28442b4caf855 (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: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Andrea Zucchelli <zukka77@gmail.com>
# Maintainer: SanskritFritz (gmail)

pkgname=tinyproxy-git
_gitname="tinyproxy"
pkgver=1.11.0.rc1.r86.g73da8a3
pkgrel=1
epoch=2
pkgdesc='A light-weight HTTP proxy daemon for POSIX operating systems.'
arch=('i686' 'x86_64')
url='https://tinyproxy.github.io/'
license=('GPL')
makedepends=('asciidoc' 'git')
provides=('tinyproxy')
conflicts=('tinyproxy')
backup=('etc/tinyproxy/tinyproxy.conf')
source=('tinyproxy.tmpfiles.conf' 'tinyproxy.service'
        "git+https://github.com/tinyproxy/tinyproxy.git")
md5sums=('3c2764578f26581346fe312da0519a3e'
         '8e97b05cc8c87f7efefbf957e77c7f18'
         'SKIP')

pkgver() {
	cd "$_gitname"
	git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
	cd "$srcdir/$_gitname"
	./autogen.sh
	./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-transparent --sbindir=/usr/bin
	make
}

package() {
	cd "$srcdir/$_gitname"
	make DESTDIR="$pkgdir" install

# 	install -dm0755 -o nobody -g nobody "$pkgdir/var/log/$_gitname"
# 	install -dm0755 -o nobody -g nobody "$pkgdir/var/run/$_gitname"

	install -Dm644 -o nobody -g nobody "$srcdir/tinyproxy.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/tinyproxy.conf"

	# Provide sane defaults
	sed -i '/^#Listen/a\Listen 127.0.0.1' "$pkgdir/etc/tinyproxy/tinyproxy.conf"
	install -Dm0644 "$srcdir/tinyproxy.service" "$pkgdir/usr/lib/systemd/system/tinyproxy.service"
}