Skip to content

Instantly share code, notes, and snippets.

@phi-gamma
Created May 19, 2012 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phi-gamma/2730934 to your computer and use it in GitHub Desktop.
Save phi-gamma/2730934 to your computer and use it in GitHub Desktop.
PKGBUILD for polipo-git
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
# for more information on packaging from GIT sources.
# Maintainer: Your Name <jhernberg@alchemy.lu>
pkgname=polipo-git
pkgver=20120519
pkgrel=1
pkgdesc="A caching web proxy"
arch=('i686' 'x86_64')
url="http://www.pps.jussieu.fr/~jch/software/polipo/"
license=('custom')
depends=('glibc' 'bash')
makedepends=('git' 'texinfo')
provides=('polipo')
conflicts=('polipo' 'polipo-darcs')
install=polipo.install
source=(polipo.install polipo.cron polipo.rc.d)
md5sums=('2ad2208765e69a3ec727930647ef5e71'
'bac0e1a871964c931eb5f7a369b3243c'
'443e442f7071e31dbd53fc9d810a2c3e')
_gitroot=https://github.com/jech/polipo.git
_gitname="$pkgname"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [[ -d "$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
msg "Starting build..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
make all
}
package() {
cd "$srcdir/$_gitname-build"
make PREFIX="$pkgdir/usr" \
MANDIR="$pkgdir/usr/share/man" \
INFODIR="$pkgdir/usr/share/info" \
LOCAL_ROOT="$pkgdir/usr/share/polipo/www" \
DISK_CACHE_ROOT="$pkgdir/var/cache/polipo" \
install
# install config files
install -Dm 644 config.sample $pkgdir/etc/polipo/config.sample
install -Dm 644 forbidden.sample $pkgdir/etc/polipo/forbidden.sample
# install license
install -Dm644 COPYING $pkgdir/usr/share/licenses/polipo/LICENSE
# install daemon scripts / cron
install -Dm 755 $srcdir/polipo.rc.d $pkgdir/etc/rc.d/polipo
install -Dm 755 $srcdir/polipo.cron $pkgdir/usr/share/polipo/polipo.cron
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment