updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / stapler-git / PKGBUILD
blobfedeeef2aca83acc9323426112f70c67726043c5
1 # Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
2 pkgname=stapler-git
3 pkgver=20111012
4 pkgrel=2
5 pkgdesc="Utility making use of the pypdf library for a lighter alternative to pdftk"
6 url="http://github.com/hellerbarde/stapler/tree/master"
7 arch=('any')
8 license=('custom')
9 depends=('python-pypdf')
10 makedepends=('git')
11 source=()
12 md5sums=()
14 _gitroot="git://github.com/hellerbarde/stapler.git"
15 _gitname="stapler"
17 build() {
18   cd "$srcdir"
19   msg "Connecting to GIT server...."
21   if [ -d $_gitname ] ; then
22     cd $_gitname && git pull origin
23     msg "The local files are updated."
24   else
25     git clone $_gitroot
26   fi
28   msg "GIT checkout done or server timeout"
29   msg "Starting make..."
31   rm -rf "$srcdir/$_gitname-build"
32   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
33   cd "$srcdir/$_gitname-build"
34   sed -i '1s+python+python2+' stapler
35   sed -i '1s+python+python2+' staplelib/tests.py
36   sed -i '1s+python+python2+' staplelib/stapler.py
38 package () {
39   cd "$srcdir/$_gitname-build"
40   install -Dm755 stapler $pkgdir/usr/bin/stapler
41   install -d $pkgdir/usr/lib/python2.7/
42   cp -r staplelib $pkgdir/usr/lib/python2.7/
43   install -Dm644 LICENSE $pkgdir/usr/share/licenses/stapler-git/LICENSE
44   install -Dm644 README.md $pkgdir/usr/share/doc/stapler-git/README