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

Bartłomiej Piotrowski bpiotrowski at nymeria.archlinux.org
Tue Jan 14 18:45:30 UTC 2014


    Date: Tuesday, January 14, 2014 @ 19:45:30
  Author: bpiotrowski
Revision: 104041

upgpkg: luarocks 2.1.2-1

- new upstream release
- switch to lua 5.2 as default (FS#36088)
- build and package luarocks for lua 5.1 separately

Modified:
  luarocks/trunk/PKGBUILD

----------+
 PKGBUILD |   64 +++++++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 48 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-01-14 17:14:01 UTC (rev 104040)
+++ PKGBUILD	2014-01-14 18:45:30 UTC (rev 104041)
@@ -1,40 +1,72 @@
 # $Id$
-# Maintainer:  Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
+# Maintainer:  Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
 # Contributor: Chris Brannon <cmbrannon79 at gmail.com>
 # Contributor: Geoffroy Carrier <geoffroy at archlinux.org>
 
-pkgname=luarocks
-pkgver=2.1.1
+pkgbase=luarocks
+pkgname=('luarocks' 'luarocks5.1')
+pkgver=2.1.2
 pkgrel=1
-pkgdesc='Deployment and management system for Lua 5.1 modules'
 arch=('any')
 url='http://luarocks.org/'
 license=('custom')
-depends=('lua51' 'unzip' 'zip' 'curl')
+depends=('unzip' 'zip' 'curl')
+makedepends=('lua' 'lua51')
 optdepends=('cvs: for fetching sources from CVS repositories'
             'git: for fetching sources from git repositories'
             'mercurial: for fetching sources from mercurial repositories'
-            'lua51-sec: HTTPS support'
             'cmake: for building rocks that use the cmake build system')
-backup=('etc/luarocks/config-5.1.lua')
 options=('!makeflags')
 source=(http://luarocks.org/releases/$pkgname-$pkgver.tar.gz)
-md5sums=('911da64d6426340674ba478b40b26b4e')
+md5sums=('0afc5fd6ee6ec6128fccda1bc559f41e')
 
+prepare() {
+  cp -r $pkgbase-$pkgver ${pkgbase}5.1-$pkgver
+}
+
 build() {
-  cd $pkgname-$pkgver
 
+  cd $pkgbase-$pkgver
+  LUA_VERSION= ./configure --prefix=/usr \
+    --sysconfdir=/etc/luarocks \
+    --lua-version=5.2 \
+    --with-lua-include=/usr/include \
+    --with-downloader=curl \
+    --versioned-rocks-dir
+  make
+
+  cd ../${pkgbase}5.1-$pkgver
   ./configure --prefix=/usr \
-              --sysconfdir=/etc/luarocks \
-              --with-lua-include=/usr/include/lua5.1/ \
-              --with-downloader=curl
-  make 
+    --sysconfdir=/etc/luarocks \
+    --lua-version=5.1 \
+    --with-lua-include=/usr/include/lua5.1 \
+    --with-downloader=curl \
+    --versioned-rocks-dir
+  make
+  sed -i 's/env lua/env lua5.1/' src/bin/luarocks{,-admin}
+
 }
 
-package() {
+package_luarocks() {
+  pkgdesc='Deployment and management system for Lua 5.2 modules'
+  backup=('etc/luarocks/config-5.2.lua')
+  depends+=('lua')
+  optdepends+=('lua-sec: HTTPS support')
+
   cd $pkgname-$pkgver
   make install DESTDIR="$pkgdir"
   install -D COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-  ln -sf luarocks-admin-5.1 "$pkgdir"/usr/bin/luarocks-admin
-  ln -sf luarocks-5.1 "$pkgdir"/usr/bin/luarocks
 }
+
+package_luarocks5.1() {
+  pkgdesc='Deployment and management system for Lua 5.1 modules'
+  backup=('etc/luarocks/config-5.1.lua')
+  depends+=('lua51')
+  optdepends+=('lua51-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}
+}




More information about the arch-commits mailing list