updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / tinyproxy-git / PKGBUILD
blobd58a2768886dde23de3f92c69e0700752ae405d4
1 # Contributor: Lukas Fleischer <archlinux at cryptocrack dot de>
2 # Contributor: Andrea Zucchelli <zukka77@gmail.com>
3 # Contributor SanskritFritz (gmail)
5 pkgname=tinyproxy-git
6 pkgver=20120106
7 pkgrel=1
8 pkgdesc='A light-weight HTTP proxy. Transparent mode enabled.'
9 arch=('i686' 'x86_64')
10 url='https://banu.com/tinyproxy/'
11 license=('GPL')
12 makedepends=('asciidoc' 'git')
13 provides=('tinyproxy')
14 conflicts=('tinyproxy')
15 backup=('etc/tinyproxy/tinyproxy.conf')
16 source=('tinyproxy.sh' 'tinyproxy.tmpfiles.conf')
17 md5sums=('90eb2b3371e56d5a784fd826d4a6e5f8'
18          '3c2764578f26581346fe312da0519a3e')
20 _gitroot="git://banu.com/tinyproxy.git"
21 _gitname="tinyproxy"
23 build() {
24         cd "$srcdir"
25         msg "Connecting to the GIT repository..."
27         if [ -d "$srcdir/$_gitname" ] ; then
28                 cd $_gitname && git pull origin
29                 msg "The local files are updated."
30         else
31                 git clone $_gitroot
32         fi
34         msg "GIT checkout done (who invented that stupid 'server timeout' message? :)"
35         msg "Starting make..."
37         cd $srcdir/$_gitname
39         ./autogen.sh
40         ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-transparent
41         make
44 package() {
45         cd $srcdir/$_gitname
46         make DESTDIR="${pkgdir}" install
47         install -Dm0755 "${srcdir}/tinyproxy.sh" "${pkgdir}/etc/rc.d/tinyproxy"
49         install -dm0755 -o nobody -g nobody "${pkgdir}/var/log/${_gitname}"
50         install -dm0755 -o nobody -g nobody "${pkgdir}/var/run/${_gitname}"
52         install -Dm644 -o nobody -g nobody "$srcdir/tinyproxy.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/tinyproxy.conf"
54         # Provide sane defaults
55         sed -i '/^#Listen/a\Listen 127.0.0.1' "${pkgdir}/etc/tinyproxy/tinyproxy.conf"