summaryrefslogtreecommitdiff
path: root/community/lua-socket/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/lua-socket/PKGBUILD')
-rw-r--r--community/lua-socket/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/community/lua-socket/PKGBUILD b/community/lua-socket/PKGBUILD
new file mode 100644
index 000000000..f4be7a699
--- /dev/null
+++ b/community/lua-socket/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 81162 2012-12-12 13:10:55Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Anders Bergh <anders1@gmail.com>
+
+pkgbase=lua-socket
+pkgname=(lua-socket lua51-socket)
+pkgver=2.0.2
+pkgrel=2
+pkgdesc='Networking support library for the Lua language'
+arch=('i686' 'x86_64')
+url='http://www.cs.princeton.edu/~diego/professional/luasocket/'
+license=('MIT')
+replaces=('luasocket')
+conflicts=('luasocket')
+makedepends=('lua' 'lua51')
+source=(http://luaforge.net/frs/download.php/2664/luasocket-$pkgver.tar.gz
+ luasocket-unixsocket.patch
+ lua52.patch)
+md5sums=('41445b138deb7bcfe97bff957503da8e'
+ '8d116bb70bd7a2fa15cbe949d4cfc35e'
+ '6f9c6416dd70a7bc1a867003f08c2752')
+
+build() {
+ msg2 'Building with lua 5.2'
+ cp -a luasocket-$pkgver luasocket-$pkgver-52
+ cd luasocket-$pkgver-52
+ patch -Np1 -i "$srcdir/luasocket-unixsocket.patch"
+ patch -Np1 -i "$srcdir/lua52.patch"
+ make
+ msg2 'Building with lua 5.1'
+ cd ../luasocket-$pkgver
+ patch -Np1 -i "$srcdir/luasocket-unixsocket.patch"
+ make LUAINC=-I/usr/include/lua5.1
+}
+
+package_lua-socket() {
+ depends=('lua')
+ cd luasocket-$pkgver
+ make DESTDIR="$pkgdir/" \
+ INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.1' \
+ INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.1' install
+ install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_lua51-socket() {
+ depends=('lua51')
+ cd luasocket-$pkgver
+ make DESTDIR="$pkgdir/" \
+ INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.2' \
+ INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.2' install
+ install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}