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

Anatol Pomozov anatolik at archlinux.org
Mon May 4 16:33:30 UTC 2015


    Date: Monday, May 4, 2015 @ 18:33:30
  Author: anatolik
Revision: 132732

upgpkg: luarocks 2.2.1-1

Lua 5.3 rebuild

Modified:
  luarocks/trunk/PKGBUILD

----------+
 PKGBUILD |   41 +++++++++++++++++++++++++++++++++--------
 1 file changed, 33 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-05-04 15:45:16 UTC (rev 132731)
+++ PKGBUILD	2015-05-04 16:33:30 UTC (rev 132732)
@@ -4,14 +4,14 @@
 # Contributor: Geoffroy Carrier <geoffroy at archlinux.org>
 
 pkgbase=luarocks
-pkgname=('luarocks' 'luarocks5.1')
-pkgver=2.2.0
+pkgname=('luarocks' 'luarocks5.1' 'luarocks5.2')
+pkgver=2.2.1
 pkgrel=1
 arch=('any')
 url='http://luarocks.org/'
 license=('custom')
 depends=('unzip' 'zip' 'curl')
-makedepends=('lua' 'lua51')
+makedepends=('lua' 'lua51' 'lua52')
 optdepends=('cvs: for fetching sources from CVS repositories'
             'git: for fetching sources from git repositories'
             'mercurial: for fetching sources from mercurial repositories'
@@ -18,10 +18,11 @@
             'cmake: for building rocks that use the cmake build system')
 options=('!makeflags')
 source=(http://luarocks.org/releases/$pkgname-$pkgver.tar.gz)
-md5sums=('eb142e0f0891ea4243ef3b7582cfbbaa')
+md5sums=('718a0e8c257aace3ec16ebc2cfe9c696')
 
 prepare() {
   cp -r $pkgbase-$pkgver ${pkgbase}5.1-$pkgver
+  cp -r $pkgbase-$pkgver ${pkgbase}5.2-$pkgver
 }
 
 build() {
@@ -29,7 +30,7 @@
   cd $pkgbase-$pkgver
   LUA_VERSION= ./configure --prefix=/usr \
     --sysconfdir=/etc/luarocks \
-    --lua-version=5.2 \
+    --lua-version=5.3 \
     --with-lua-include=/usr/include \
     --with-downloader=curl \
     --versioned-rocks-dir
@@ -45,11 +46,20 @@
   make
   sed -i 's/env lua/env lua5.1/' src/bin/luarocks{,-admin}
 
+  cd ../${pkgbase}5.2-$pkgver
+  ./configure --prefix=/usr \
+    --sysconfdir=/etc/luarocks \
+    --lua-version=5.2 \
+    --with-lua-include=/usr/include/lua5.2 \
+    --with-downloader=curl \
+    --versioned-rocks-dir
+  make
+  sed -i 's/env lua/env lua5.2/' src/bin/luarocks{,-admin}
 }
 
 package_luarocks() {
-  pkgdesc='Deployment and management system for Lua 5.2 modules'
-  backup=('etc/luarocks/config-5.2.lua')
+  pkgdesc='Deployment and management system for Lua 5.3 modules'
+  backup=('etc/luarocks/config-5.3.lua')
   depends+=('lua')
   optdepends+=('lua-sec: HTTPS support')
 
@@ -58,7 +68,7 @@
   install -D COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 
   # FS#40388
-  sed -i '/^LUAROCKS_UNAME_M/d' "$pkgdir"/usr/share/lua/5.2/luarocks/site_config.lua
+  sed -i '/^LUAROCKS_UNAME_M/d' "$pkgdir"/usr/share/lua/5.3/luarocks/site_config.lua
 }
 
 package_luarocks5.1() {
@@ -75,3 +85,18 @@
   # FS#40388
   sed -i '/^LUAROCKS_UNAME_M/d' "$pkgdir"/usr/share/lua/5.1/luarocks/site_config.lua
 }
+
+package_luarocks5.2() {
+  pkgdesc='Deployment and management system for Lua 5.2 modules'
+  backup=('etc/luarocks/config-5.2.lua')
+  depends+=('lua52')
+  optdepends+=('lua52-sec: HTTPS support')
+
+  cd $pkgname-$pkgver
+  make install DESTDIR="$pkgdir"
+  install -D COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  rm "$pkgdir"/usr/bin/luarocks{,-admin}
+
+  # FS#40388
+  sed -i '/^LUAROCKS_UNAME_M/d' "$pkgdir"/usr/share/lua/5.2/luarocks/site_config.lua
+}



More information about the arch-commits mailing list