summaryrefslogtreecommitdiff
path: root/community/luasec/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/luasec/PKGBUILD')
-rw-r--r--community/luasec/PKGBUILD56
1 files changed, 37 insertions, 19 deletions
diff --git a/community/luasec/PKGBUILD b/community/luasec/PKGBUILD
index 50ecd0af9..ff1c0eb63 100644
--- a/community/luasec/PKGBUILD
+++ b/community/luasec/PKGBUILD
@@ -1,30 +1,48 @@
-# $Id: PKGBUILD 66219 2012-02-23 03:33:12Z spupykin $
+# $Id: PKGBUILD 81120 2012-12-12 00:49:31Z eric $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Dwayne Bent <dbb.1@liqd.org>
# Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com>
-pkgname=luasec
-pkgver=0.4
-pkgrel=3
-pkgdesc="Lua bindings for OpenSSL library to provide TLS/SSL communication."
+pkgbase=luasec
+pkgname=(lua-sec lua51-sec)
+pkgver=0.4.1
+pkgrel=1
+pkgdesc='Lua bindings for OpenSSL library to provide TLS/SSL communication.'
arch=('i686' 'x86_64' 'mips64el')
-url="http://luasec.luaforge.net/"
+url='http://luasec.luaforge.net/'
license=('MIT')
-depends=('openssl>=0.9.7' 'lua>=5.1' 'luasocket>=2.0.2')
-source=("http://www.inf.puc-rio.br/~brunoos/luasec/download/$pkgname-$pkgver.tar.gz"
- 'luasec.patch')
-md5sums=('712158d60207bdbb6215fc7e07d8db24'
- '25e48c1115225d9884cdb7f5ca4949a9')
+makedepends=('openssl' 'lua' 'lua-socket' 'lua51' 'lua51-socket')
+conflicts=('luasec')
+replaces=('luasec')
+source=("http://www.inf.puc-rio.br/~brunoos/luasec/download/$pkgbase-$pkgver.tar.gz")
+md5sums=('b8a5fde3b3fdb6174f54cd51d7f53e12')
build() {
- install -d "$pkgdir/usr/share/lua/5.1"
- install -d "$pkgdir/usr/lib/lua/5.1"
- install -d "$pkgdir/usr/share/licenses/$pkgname"
-
- cd "$srcdir/$pkgname-$pkgver"
- patch -p1 Makefile "$srcdir/luasec.patch"
+ cp -a $pkgbase-$pkgver $pkgbase-$pkgver-51
+ msg2 'Building with lua 5.2'
+ cd $pkgbase-$pkgver
make linux
- make DESTDIR=$pkgdir install
+ msg2 'Building with lua 5.1'
+ cd ../$pkgbase-$pkgver-51
+ make INCDIR=-I/usr/include/lua5.1 linux
+}
- install -m644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+package_lua-sec() {
+ depends=('openssl' 'lua' 'lua-socket')
+
+ install -dm755 "$pkgdir/usr/lib/lua/5.2"
+ cd $pkgbase-$pkgver
+ make LUACPATH="$pkgdir/usr/lib/lua/5.2" LUAPATH="$pkgdir/usr/share/lua/5.2" install
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
+
+package_lua51-sec() {
+ depends=('openssl' 'lua51' 'lua51-socket')
+
+ install -dm755 "$pkgdir/usr/lib/lua/5.1"
+ cd $pkgbase-$pkgver-51
+ make LUACPATH="$pkgdir/usr/lib/lua/5.1" LUAPATH="$pkgdir/usr/share/lua/5.1" install
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=4 sw=4 et: