diff options
Diffstat (limited to 'community/luasec/PKGBUILD')
-rw-r--r-- | community/luasec/PKGBUILD | 74 |
1 files changed, 42 insertions, 32 deletions
diff --git a/community/luasec/PKGBUILD b/community/luasec/PKGBUILD index ac93b46cb..583ac6aac 100644 --- a/community/luasec/PKGBUILD +++ b/community/luasec/PKGBUILD @@ -1,49 +1,59 @@ -# $Id: PKGBUILD 81569 2012-12-24 14:48:29Z spupykin $ +# $Id: PKGBUILD 98944 2013-10-21 14:45:17Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Dwayne Bent <dbb.1@liqd.org> # Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com> pkgbase=luasec -pkgname=(lua51-sec) -pkgver=0.4.1 -pkgrel=4 +pkgname=(lua-sec lua51-sec) +pkgver=20131021git +pkgrel=1 pkgdesc='Lua bindings for OpenSSL library to provide TLS/SSL communication.' arch=('i686' 'x86_64') -url='http://luasec.luaforge.net/' +url='https://github.com/brunoos/luasec/wiki' license=('MIT') -#makedepends=('openssl' 'lua' 'lua-socket' 'lua51' 'lua51-socket') -makedepends=('openssl' 'lua51' 'lua51-socket') -source=("http://www.inf.puc-rio.br/~brunoos/luasec/download/luasec-$pkgver.tar.gz") -md5sums=('b8a5fde3b3fdb6174f54cd51d7f53e12') +makedepends=('openssl' 'lua' 'lua-socket' 'lua51' 'lua51-socket' 'git') +source=("luasec::git://github.com/brunoos/luasec.git") +md5sums=('SKIP') build() { - cp -a luasec-$pkgver luasec-$pkgver-51 - msg2 'Building with lua 5.2' - cd luasec-$pkgver - make linux - msg2 'Building with lua 5.1' - cd ../luasec-$pkgver-51 - make INCDIR=-I/usr/include/lua5.1 linux + cp -a luasec luasec-51 + + unset CFLAGS + unset LDFLAGS + + msg2 'Building with lua 5.2' + cd luasec + make linux + + msg2 'Building with lua 5.1' + cd ../luasec-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' \ + -e 's|include .luaconf.h.|include "lua5.1/luaconf.h"|g' \ + -e 's|include .lauxlib.h.|include "lua5.1/lauxlib.h"|g' \ + {} \; + make linux } -#package_lua-sec() { -# depends=('openssl' 'lua' 'lua-socket') -# -# install -dm755 "$pkgdir/usr/lib/lua/5.2" -# cd luasec-$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_lua-sec() { + depends=('openssl' 'lua' 'lua-socket') + + install -dm755 "$pkgdir/usr/lib/lua/5.2" + cd luasec + 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') - conflicts=('luasec') - replaces=('luasec') - - install -dm755 "$pkgdir/usr/lib/lua/5.1" - cd luasec-$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" + depends=('openssl' 'lua51' 'lua51-socket') + conflicts=('luasec') + replaces=('luasec') + + install -dm755 "$pkgdir/usr/lib/lua/5.1" + cd luasec-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: |