diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 87 |
1 files changed, 59 insertions, 28 deletions
@@ -1,50 +1,81 @@ -# Maintainer: Stephen Smith <stephen304@gmail.com> +# Maintainer: Caleb Maclennan <caleb@alerque.com> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Anders Bergh <anders1@gmail.com> +# Contributor: Stephen Smith <stephen304@gmail.com> -pkgname=('lua-socket-git' 'lua51-socket-git' 'lua52-socket-git') pkgbase=lua-socket-git -pkgver=646.288219f +pkgname=(lua-socket-git lua51-socket-git lua52-socket-git lua53-socket-git) +pkgver=3.0.0.r0.g88c8a85 pkgrel=1 -pkgdesc="Network support for the Lua language" -arch=('i686' 'x86_64') -url="http://www.impa.br/~diego/software/luasocket" +pkgdesc='Networking support library for the Lua language' +arch=('x86_64') +url='https://github.com/lunarmodules/luasocket' license=('MIT') -source=("$pkgbase::git+https://github.com/diegonehab/luasocket.git#branch=master") +#options=('debug') +makedepends=('lua' 'lua51' 'lua52' 'lua53' 'git') +source=("git+https://github.com/lunarmodules/luasocket.git") md5sums=('SKIP') +prepare() { + cp -a luasocket luasocket-51 + cp -a luasocket luasocket-52 + cp -a luasocket luasocket-53 +} + pkgver() { - cd "$srcdir"/"$pkgbase" - echo $(git rev-list --count master).$(git rev-parse --short master) + cd luasocket + git describe --always --long --tags --abbrev=7 HEAD | + sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } -_package_helper() { - _lua_ver=$1 - _lua_ver_nodot=${_lua_ver//.} +build() { + cd "$srcdir"/luasocket-51 + MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.1 linux + + cd "$srcdir"/luasocket-52 + MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.2 linux - mkdir -p "$_lua_ver" - cd "$pkgbase" - luarocks-${_lua_ver} make --pack-binary-rock --deps-mode=none luasocket-scm-0.rockspec - mv *.rock ../${_lua_ver}/ - luarocks-${_lua_ver} install --tree="$pkgdir/usr/" --deps-mode=none ../${_lua_ver}/*.rock - find "$pkgdir/usr" -name manifest -delete + cd "$srcdir"/luasocket-53 + MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.3 linux + + cd "$srcdir"/luasocket + MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.4 linux } package_lua51-socket-git() { - depends=('lua51' 'luarocks5.1') - provides=('lua51-socket') + depends=('lua51') + provides=("lua51-socket=$pkgver") + conflicts=('lua51-socket' 'luasocket') + replaces=('luasocket') - _package_helper "5.1" + cd luasocket-51 + make DESTDIR="$pkgdir" LUAV=5.1 prefix=/usr install-unix + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } package_lua52-socket-git() { - depends=('lua52' 'luarocks5.2') - provides=('lua52-socket') + depends=('lua52') + provides=("lua52-socket=$pkgver") + conflicts=('lua52-socket') + cd luasocket-52 + make DESTDIR="$pkgdir" LUAV=5.2 prefix=/usr install-unix + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} - _package_helper "5.2" +package_lua53-socket-git() { + depends=('lua53') + provides=("lua53-socket=$pkgver") + conflicts=('lua53-socket') + cd luasocket-53 + make DESTDIR="$pkgdir" LUAV=5.3 prefix=/usr install-unix + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } package_lua-socket-git() { - depends=('lua' 'luarocks') - provides=('lua-socket') - - _package_helper "5.3" + depends=('lua') + provides=("lua-socket=$pkgver") + conflicts=('lua-socket') + cd luasocket + make DESTDIR="$pkgdir" LUAV=5.4 prefix=/usr install-unix + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |