updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / lua-archive-git / PKGBUILD
blob27c09074079bf5eca553472e6abf2be612f53dad
1 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
3 pkgname=lua-archive-git
4 pkgver=20100318
5 pkgrel=1
6 pkgdesc="Lua libarchive integration."
7 arch=('i686' 'x86_64')
8 url="http://github.com/brimworks/lua-archive/"
9 license=('MIT')
10 depends=('lua')
11 makedepends=('git' 'cmake')
12 provides=('lua-archive')
13 conflicts=('lua-archive')
14 source=('LICENSE')
15 md5sums=('838c366f69b72c5df05c96dff79b35f2')
17 _gitroot="git://github.com/brimworks/lua-archive.git"
18 _gitname="lua-archive"
20 build() {
21   cd "$srcdir"
22   msg "Connecting to GIT server...."
24   if [ -d $_gitname ] ; then
25     cd $_gitname && git pull origin
26     msg "The local files are updated."
27   else
28     git clone $_gitroot $_gitname
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "$srcdir/$_gitname-build"
35   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
36   cd "$srcdir/$_gitname-build"
38   sed -i 's|share/lua/cmod|lib/lua/5.1|' CMakeLists.txt
39   cmake . -DCMAKE_INSTALL_PREFIX="/usr" || return 1
40   make || return 1
43 package() {
44   cd "$srcdir/$_gitname-build"
45   make DESTDIR=${pkgdir} install || return 1
46   install -Dm644 ${srcdir}/LICENSE \
47         ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
48