updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / lua-zlib-git / PKGBUILD
blob942e2bc03ddd9b5a548e1d867c9a382a883ed72f
1 # Maintainer: Dwayne Bent <dbb.1@liqd.org>
3 pkgname=lua-zlib-git
4 pkgver=20100218
5 pkgrel=1
6 url="http://github.com/brimworks/lua-zlib"
7 pkgdesc='Simple streaming interface to zlib for Lua.'
8 arch=('i686' 'x86_64')
9 license=('MIT')
10 provides=('lua-zlib')
11 depends=('lua' 'zlib')
12 makedepends=('git')
13 source=('Makefile')
14 md5sums=('643265eefdeadf60bd8e4848266a3ef6')
16 _giturl='git://github.com/brimworks/lua-zlib.git'
17 _gitlocal='lua-zlib'
19 build() {
20     _getsrc || return 1
21     
22     mkdir -p "$pkgdir/usr/lib/lua/5.1/"
23     mkdir -p "$pkgdir/usr/share/licenses/lua-zlib"
25     make SRCDIR="$srcdir/$_gitlocal" DESTDIR="$pkgdir" install
26     install -m644 "$srcdir/$_gitlocal/README" "$pkgdir/usr/share/licenses/lua-zlib/README"
29 _getsrc() {
30     if [ -d $_gitlocal ]; then
31         msg "Updating source files..."
32         pushd $_gitlocal && git pull origin && popd || return 1
33     else
34         msg "Cloning source files..."
35         git clone --depth 1 $_giturl $_gitlocal || return 1
36     fi