[arch-commits] Commit in luasocket/trunk (PKGBUILD)

Anatol Pomozov anatolik at archlinux.org
Tue May 5 14:59:39 UTC 2015


    Date: Tuesday, May 5, 2015 @ 16:59:39
  Author: anatolik
Revision: 132792

upgpkg: luasocket 3.0rc1-6

- use lua5.3 specific dirs for libraries
- add library for lua 5.2

Modified:
  luasocket/trunk/PKGBUILD

----------+
 PKGBUILD |   42 +++++++++++++++++++++++++++++++-----------
 1 file changed, 31 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-05-05 14:50:24 UTC (rev 132791)
+++ PKGBUILD	2015-05-05 14:59:39 UTC (rev 132792)
@@ -3,14 +3,14 @@
 # Contributor: Anders Bergh <anders1 at gmail.com>
 
 pkgbase=luasocket
-pkgname=(lua-socket lua51-socket)
+pkgname=(lua-socket lua51-socket lua52-socket)
 pkgver=3.0rc1
-pkgrel=5
+pkgrel=6
 pkgdesc='Networking support library for the Lua language'
 arch=('i686' 'x86_64')
 url='https://github.com/diegonehab/luasocket'
 license=('MIT')
-makedepends=('lua' 'lua51')
+makedepends=('lua' 'lua51' 'lua52')
 source=("$pkgbase-$pkgver.tar.gz::https://github.com/diegonehab/luasocket/archive/v${pkgver/rc/-rc}.tar.gz"
 	"https://github.com/diegonehab/luasocket/commit/396e9e5.patch")
 md5sums=('08bd2f265b244eb4bf5c2c36bf89b759'
@@ -23,12 +23,14 @@
 
 build() {
   cp -a luasocket-${pkgver/rc/-rc} luasocket-${pkgver/rc/-rc}-52
-  msg2 'Building with lua 5.2'
-  pushd luasocket-${pkgver/rc/-rc}-52
-  make LUAV=5.2
-  popd
+  cp -a luasocket-${pkgver/rc/-rc} luasocket-${pkgver/rc/-rc}-51
+
+  msg2 'Building with lua 5.3'
+  cd "$srcdir"/luasocket-${pkgver/rc/-rc}
+  make LUAV=5.3
+
   msg2 'Building with lua 5.1'
-  cd luasocket-${pkgver/rc/-rc}
+  cd "$srcdir"/luasocket-${pkgver/rc/-rc}-51
   find . -type f -name \*.[ch] -exec sed -i \
     -e 's|include "lua.h|include "lua5.1/lua.h|g' \
     -e 's|include "lualib.h|include "lua5.1/lualib.h|g' \
@@ -36,12 +38,22 @@
     -e 's|include "lauxlib.h|include "lua5.1/lauxlib.h|g' \
     {} \;
   make LUAV=5.1
+
+  msg2 'Building with lua 5.2'
+  cd "$srcdir"/luasocket-${pkgver/rc/-rc}-52
+  find . -type f -name \*.[ch] -exec sed -i \
+    -e 's|include "lua.h|include "lua5.2/lua.h|g' \
+    -e 's|include "lualib.h|include "lua5.2/lualib.h|g' \
+    -e 's|include "luaconf.h|include "lua5.2/luaconf.h|g' \
+    -e 's|include "lauxlib.h|include "lua5.2/lauxlib.h|g' \
+    {} \;
+  make LUAV=5.2
 }
 
 package_lua-socket() {
   depends=('lua')
-  cd luasocket-${pkgver/rc/-rc}-52
-  make DESTDIR="$pkgdir/" LUAV=5.2 prefix=/usr install-unix
+  cd luasocket-${pkgver/rc/-rc}
+  make DESTDIR="$pkgdir/" LUAV=5.3 prefix=/usr install-unix
   install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
@@ -50,7 +62,15 @@
   replaces=('luasocket')
   conflicts=('luasocket')
 
-  cd luasocket-${pkgver/rc/-rc}
+  cd luasocket-${pkgver/rc/-rc}-51
   make DESTDIR="$pkgdir/" LUAV=5.1 prefix=/usr install-unix
   install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
+
+package_lua52-socket() {
+  depends=('lua52')
+
+  cd luasocket-${pkgver/rc/-rc}-52
+  make DESTDIR="$pkgdir/" LUAV=5.2 prefix=/usr install-unix
+  install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}



More information about the arch-commits mailing list