updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / lua-yajl-git / PKGBUILD
blob60189da8db05820e958508fdab3018da3cbc7229
1 # Maintainer: Justin Davis <jrcd83@gmail.com>
2 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
4 pkgname=lua-yajl-git
5 pkgver=20110429
6 pkgrel=1
7 pkgdesc="Integrates the yajl JSON library with Lua."
8 arch=(i686 x86_64)
9 url='http://github.com/brimworks/lua-yajl'
10 license=(MIT)
11 depends=('yajl>=2' 'lua>=5.1')
12 makedepends=(git cmake)
13 options=(!libtool)
14 source=('LICENSE')
15 md5sums=('27c5699b8602d4d18e139339b96ae5dc')
17 _gitroot="git://github.com/brimworks/lua-yajl.git"
18 _gitbranch="master"
19 _repodir="${srcdir}/lua-yajl"
21 build() {
22   msg "Building ${pkgname}..."
24   if [ -d "$_repodir" ] ; then
25     warning 'Repository directory already exists!'
26     cd "$_repodir"
27     git checkout master
28     msg2 "Pulling..."
29     git pull "$_gitroot" master
30   else
31     msg2 "Cloning $_gitroot repository..."
32     git clone "$_gitroot" "$_repodir"
33     cd "$_repodir"
34     git checkout "$_gitbranch"
35   fi
37   cmake .
38   make
41 package(){
42   msg "Packaging ${pkgname}..."
43   cd "$_repodir"
44   make DESTDIR="$pkgdir" install
45   install -Dm644 "${srcdir}/LICENSE" \
46     "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
48   mkdir -p "${pkgdir}/usr/lib/lua/5.1"
49   mv -t "${pkgdir}/usr/lib/lua/5.1/" "${pkgdir}/usr/local/share/lua/cmod/"* 
50   rm -R "${pkgdir}/usr/local"
51
53 # Local Variables:
54 # mode: shell-script
55 # sh-basic-offset: 2
56 # End:
57 # vim:set ts=2 sw=2 et: