1 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
3 pkgname=lua-archive-git
6 pkgdesc="Lua libarchive integration."
8 url="http://github.com/brimworks/lua-archive/"
11 makedepends=('git' 'cmake')
12 provides=('lua-archive')
13 conflicts=('lua-archive')
15 md5sums=('838c366f69b72c5df05c96dff79b35f2')
17 _gitroot="git://github.com/brimworks/lua-archive.git"
18 _gitname="lua-archive"
22 msg "Connecting to GIT server...."
24 if [ -d $_gitname ] ; then
25 cd $_gitname && git pull origin
26 msg "The local files are updated."
28 git clone $_gitroot $_gitname
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
44 cd "$srcdir/$_gitname-build"
45 make DESTDIR=${pkgdir} install || return 1
46 install -Dm644 ${srcdir}/LICENSE \
47 ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE