summaryrefslogtreecommitdiff
path: root/community/lua-zlib/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/lua-zlib/PKGBUILD')
-rw-r--r--community/lua-zlib/PKGBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/community/lua-zlib/PKGBUILD b/community/lua-zlib/PKGBUILD
new file mode 100644
index 000000000..17a34d721
--- /dev/null
+++ b/community/lua-zlib/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 93359 2013-07-02 09:43:15Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=(lua-zlib lua51-zlib)
+pkgbase=lua-zlib
+pkgver=20130702
+pkgrel=1
+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' 'git')
+conflicts=('lua-lzlib')
+#source=("lua-zlib-$pkgver.zip::https://github.com/brimworks/lua-zlib/zipball/v$pkgver")
+source=("git://github.com/brimworks/lua-zlib.git")
+md5sums=('SKIP')
+
+build() {
+ cp -a $srcdir/lua-zlib $srcdir/lua51-zlib
+
+ cd $srcdir/lua-zlib
+ gcc -o zlib.so -O2 -fPIC -shared lua_zlib.c -llua -lz
+
+ cd $srcdir/lua51-zlib
+ gcc -o zlib.so -O2 -fPIC -shared -I/usr/include/lua5.1 lua_zlib.c -llua5.1 -lz
+}
+
+package_lua-zlib() {
+ depends=('zlib' 'lua')
+
+ cd $srcdir/lua-zlib
+ install -Dm0755 zlib.so $pkgdir/usr/lib/lua/5.2/zlib.so
+ install -Dm644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
+}
+
+package_lua51-zlib() {
+ depends=('zlib' 'lua51')
+
+ cd $srcdir/lua51-zlib
+ install -Dm0755 zlib.so $pkgdir/usr/lib/lua/5.1/zlib.so
+ install -D -m644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
+}