Date: Wednesday, January 20, 2021 @ 14:07:06
  Author: daurnimator
Revision: 823964

Add lua-zlib

Added:
  lua-zlib/
  lua-zlib/repos/
  lua-zlib/trunk/
  lua-zlib/trunk/PKGBUILD

----------+
 PKGBUILD |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

Added: lua-zlib/trunk/PKGBUILD
===================================================================
--- lua-zlib/trunk/PKGBUILD                             (rev 0)
+++ lua-zlib/trunk/PKGBUILD     2021-01-20 14:07:06 UTC (rev 823964)
@@ -0,0 +1,65 @@
+# Maintainer: Daurnimator <daurnima...@archlinux.org>
+# Contributor: Caleb Maclennan <ca...@alerque.com>
+# Contributor: Sergej Pupykin <pupykin.s+a...@gmail.com>
+
+pkgname=("lua-zlib" "lua53-zlib" "lua52-zlib" "lua51-zlib")
+epoch=1
+pkgver=1.2
+pkgrel=3
+url='https://github.com/brimworks/lua-zlib'
+pkgdesc='Simple streaming interface to zlib for Lua'
+arch=('x86_64')
+license=('MIT')
+makedepends=('lua' 'lua53' 'lua52' 'lua51')
+depends=('zlib')
+conflicts=('lua-lzlib')
+source=("lua-zlib-$pkgver.tar.gz::https://github.com/brimworks/lua-zlib/archive/v$pkgver.tar.gz";)
+sha256sums=('26b813ad39c94fc930b168c3418e2e746af3b2e80b92f94f306f6f954cc31e7d')
+
+build() {
+  cd "lua-zlib-$pkgver"
+
+  gcc -fPIC $CPPFLAGS $CFLAGS -o lua_zlib.o -c lua_zlib.c
+  gcc -shared $LDFLAGS -o zlib.so lua_zlib.o -lz
+
+  gcc -fPIC $CPPFLAGS $CFLAGS -I/usr/include/lua5.3 -o lua_zlib.o -c lua_zlib.c
+  gcc -shared $LDFLAGS -o zlib-5.3.so lua_zlib.o -lz
+
+  gcc -fPIC $CPPFLAGS $CFLAGS -I/usr/include/lua5.2 -o lua_zlib.o -c lua_zlib.c
+  gcc -shared $LDFLAGS -o zlib-5.2.so lua_zlib.o -lz
+
+  gcc -fPIC $CPPFLAGS $CFLAGS -I/usr/include/lua5.1 -o lua_zlib.o -c lua_zlib.c
+  gcc -shared $LDFLAGS -o zlib-5.1.so lua_zlib.o -lz
+}
+
+package_lua-zlib() {
+  pkgdesc='Simple streaming interface to zlib for Lua 5.4'
+
+  cd "lua-zlib-$pkgver"
+  install -D zlib.so "$pkgdir/usr/lib/lua/5.4/zlib.so"
+  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" README
+}
+
+package_lua53-zlib() {
+  pkgdesc='Simple streaming interface to zlib for Lua 5.3'
+
+  cd "lua-zlib-$pkgver"
+  install -D zlib-5.3.so "$pkgdir/usr/lib/lua/5.3/zlib.so"
+  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" README
+}
+
+package_lua52-zlib() {
+  pkgdesc='Simple streaming interface to zlib for Lua 5.2'
+
+  cd "lua-zlib-$pkgver"
+  install -D zlib-5.2.so "$pkgdir/usr/lib/lua/5.2/zlib.so"
+  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" README
+}
+
+package_lua51-zlib() {
+  pkgdesc='Simple streaming interface to zlib for Lua 5.1'
+
+  cd "lua-zlib-$pkgver"
+  install -D zlib-5.1.so "$pkgdir/usr/lib/lua/5.1/zlib.so"
+  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" README
+}

Reply via email to