diff options
Diffstat (limited to 'community/luasocket/PKGBUILD')
-rw-r--r-- | community/luasocket/PKGBUILD | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/community/luasocket/PKGBUILD b/community/luasocket/PKGBUILD index d659a6086..684566c28 100644 --- a/community/luasocket/PKGBUILD +++ b/community/luasocket/PKGBUILD @@ -1,50 +1,49 @@ -# $Id: PKGBUILD 81274 2012-12-15 15:00:36Z seblu $ +# $Id: PKGBUILD 98942 2013-10-21 14:19:50Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: Anders Bergh <anders1@gmail.com> pkgbase=luasocket -pkgname=(lua51-socket) -pkgver=2.0.2 -pkgrel=5 +pkgname=(lua-socket lua51-socket) +pkgver=3.0rc1 +pkgrel=2 pkgdesc='Networking support library for the Lua language' arch=('i686' 'x86_64') -url='http://www.cs.princeton.edu/~diego/professional/luasocket/' +url='https://github.com/diegonehab/luasocket' license=('MIT') -replaces=('luasocket') -conflicts=('luasocket') makedepends=('lua' 'lua51') -source=("http://luaforge.net/frs/download.php/2664/luasocket-$pkgver.tar.gz" - 'luasocket-unixsocket.patch') -md5sums=('41445b138deb7bcfe97bff957503da8e' - '8d116bb70bd7a2fa15cbe949d4cfc35e') +source=("$pkgname-$pkgver.tar.gz::https://github.com/diegonehab/luasocket/archive/v${pkgver/rc/-rc}.tar.gz") +md5sums=('08bd2f265b244eb4bf5c2c36bf89b759') build() { -# cp -a luasocket-$pkgver luasocket-$pkgver-52 -# msg2 'Building with lua 5.2' -# pushd luasocket-$pkgver-52 -# patch -Np1 -i "$srcdir/luasocket-unixsocket.patch" -# make -# popd + 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 msg2 'Building with lua 5.1' - cd luasocket-$pkgver - patch -Np1 -i "$srcdir/luasocket-unixsocket.patch" - make LUAINC=-I/usr/include/lua5.1 + cd luasocket-${pkgver/rc/-rc} + 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 LUAV=5.1 } -#package_lua-socket() { -# depends=('lua') -# cd luasocket-$pkgver-52 -# make DESTDIR="$pkgdir/" \ -# INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.2' \ -# INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.2' install -# install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" -#} +package_lua-socket() { + depends=('lua') + cd luasocket-${pkgver/rc/-rc}-52 + make DESTDIR="$pkgdir/" LUAV=5.2 prefix=/usr install + install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} package_lua51-socket() { depends=('lua51') - cd luasocket-$pkgver - make DESTDIR="$pkgdir/" \ - INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.1' \ - INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.1' install + replaces=('luasocket') + conflicts=('luasocket') + + cd luasocket-${pkgver/rc/-rc} + make DESTDIR="$pkgdir/" LUAV=5.1 prefix=/usr install install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |