diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 38 insertions, 20 deletions
@@ -7,35 +7,53 @@ # Contributor: Donald Ephraim Curtis <dcurtis@gmail.com> # Contributor: Stefan Husmann <stefan-husmann@t-online.de> -_pkgname=lua-posix -pkgname="${_pkgname}-git" +_rockname=posix +pkgbase=lua-$_rockname-git +_pkgbase=luaposix +pkgname=("lua-$_rockname-git" "lua52-$_rockname-git" "lua51-$_rockname-git") pkgver=33.4.0.r158.g69c6195 -pkgrel=1 -pkgdesc='POSIX library for Lua' +_rockrel=1 +pkgrel=2 +pkgdesc="POSIX bindings for Lua" arch=('x86_64' 'i686') -url='https://github.com/luaposix/luaposix' +url="https://github.com/$_pkgbase/$_pkgbase" license=('MIT') -conflicts=("${_pkgname}") -provides=("${_pkgname}") -depends=('lua' 'lua-std-normalize') -makedepends=('git' 'help2man' 'ldoc') -options=('!makeflags') -source=("${_pkgname}::git://github.com/luaposix/luaposix.git") -md5sums=('SKIP') +makedepends=('git' 'ldoc' 'luarocks' 'lua52' 'lua51') +_lua_deps=('std-normalize') +source=("git://github.com/luaposix/luaposix.git") +sha256sums=('SKIP') pkgver() { - cd "${_pkgname}" + cd "$_pkgbase" git describe --tags --abbrev=7 HEAD | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } -build() { - cd "${_pkgname}" - ./build-aux/luke all +_package_helper() { + cd "$_pkgbase" + ls -al + luarocks --lua-version="$1" --tree="$pkgdir/usr/" \ + make --deps-mode=none --no-manifest "$_pkgbase-git-$_rockrel.rockspec" + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" } -package() { - cd "${_pkgname}" - ./build-aux/luke PREFIX="${pkgdir}"/usr install - install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}/" LICENSE +package_lua-posix-git() { + depends=('lua' "${_lua_deps[@]/#/lua-}") + provides=("${pkgname%-git}") + conflicts=("${pkgname%-git}") + _package_helper 5.3 +} + +package_lua52-posix-git() { + depends=('lua52' "${_lua_deps[@]/#/lua52-}") + provides=("${pkgname%-git}") + conflicts=("${pkgname%-git}") + _package_helper 5.2 +} + +package_lua51-posix-git() { + depends+=('lua51' "${_lua_deps[@]/#/lua51-}") + provides=("${pkgname%-git}") + conflicts=("${pkgname%-git}") + _package_helper 5.1 } |