summaryrefslogtreecommitdiff
path: root/community/lua-zlib/PKGBUILD
blob: 4b1d715acae00691394a00b72649e42a0f7fe681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# $Id: PKGBUILD 92720 2013-06-13 12:58:26Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=(lua-zlib lua51-zlib)
pkgbase=lua-zlib
pkgver=0.2
pkgrel=5
_gitver=8d07669
url="http://github.com/brimworks/lua-zlib"
pkgdesc='Simple streaming interface to zlib for Lua.'
arch=('i686' 'x86_64')
license=('MIT')
makedepends=('cmake' 'lua' 'lua51' 'zlib')
conflicts=('lua-lzlib')
source=("lua-zlib-$pkgver.zip::https://github.com/brimworks/lua-zlib/zipball/v$pkgver")
md5sums=('e6c780c0c4b6dcb88cf16949bb751be7')

build() {
  cp -a $srcdir/brimworks-lua-zlib-${_gitver} $srcdir/brimworks-lua51-zlib-${_gitver}

  cd $srcdir/brimworks-lua-zlib-${_gitver}
  sed -i "s#share/lua/cmod#lib/lua/5.2#" CMakeLists.txt
  cmake -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/usr .
  make

  cd $srcdir/brimworks-lua51-zlib-${_gitver}
#  sed -i "s#share/lua/cmod#lib/lua/5.1#" CMakeLists.txt
#  cmake -DCMAKE_BUILD_TYPE=Release \
#      -DCMAKE_INSTALL_PREFIX=/usr .
  make linux
}

package_lua-zlib() {
  depends=('zlib' 'lua')

  cd $srcdir/brimworks-lua-zlib-${_gitver}
  make DESTDIR="$pkgdir" install
  install -D -m644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
}

package_lua51-zlib() {
  depends=('zlib' 'lua51')

  cd $srcdir/brimworks-lua51-zlib-${_gitver}
  mkdir -p $pkgdir/usr/lib/lua/5.1
  make DESTDIR="$pkgdir" LUACPATH=$pkgdir/usr/lib/lua/5.1 install
  install -D -m644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
}