diff options
Diffstat (limited to 'main/lua-subprocess/APKBUILD')
-rw-r--r-- | main/lua-subprocess/APKBUILD | 67 |
1 files changed, 50 insertions, 17 deletions
diff --git a/main/lua-subprocess/APKBUILD b/main/lua-subprocess/APKBUILD index c8aef5dc35..e1dd45adeb 100644 --- a/main/lua-subprocess/APKBUILD +++ b/main/lua-subprocess/APKBUILD @@ -1,23 +1,27 @@ # Contributor: Ted Trask <ttrask01@yahoo.com> # Maintainer: Ted Trask <ttrask01@yahoo.com> + +_luaversions="5.1 5.2" pkgname=lua-subprocess -pkgver=0.0.20121211 -pkgrel=2 +pkgver=0.0.20141229 +pkgrel=0 pkgdesc="A Lua module written in C that allows you to create child processes and communicate with them" -url="https://github.com/xlq/lua-subprocess" +url="https://github.com/tdtrask/lua-subprocess" arch="all" license="AS-IS" depends="" -depends_dev="" -makedepends="$depends_dev lua-dev" install="" +depends_dev="" +makedepends="$depends_dev asciidoc" subpackages="" +for _i in $_luaversions; do + makedepends="$makedepends lua$_i-dev" + subpackages="$subpackages lua$_i-subprocess:split_${_i/./_}" +done source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz - luafileobject.patch - openexception.patch makefile.patch" -_builddir="$srcdir/$pkgname-$pkgver" -_giturl="git://github.com/xlq/lua-subprocess.git" + +_giturl="git://github.com/tdtrask/lua-subprocess.git" _upload="dev.alpinelinux.org:/archive/$pkgname/" snapshot() { @@ -40,26 +44,55 @@ snapshot() { abuild checksum } +_sdir="$srcdir"/$pkgname-$pkgver + prepare() { local i - cd "$_builddir" + cd "$_sdir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done + for _i in $_luaversions; do + cp -r "$_sdir" "$srcdir"/build-$_i + done } build() { - cd "$_builddir" + for _i in $_luaversions; do + cd "$srcdir"/build-$_i + make lua_package="lua$_i" || return 1 + done } package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 + for _i in $_luaversions; do + cd "$srcdir"/build-$_i + make lua_package="lua$_i" DESTDIR="$pkgdir" install || return 1 + done +} + +_split() { + local d= _ver=$1 + pkgdesc="A Lua $_ver module written in C that allows you to create child processes and communicate with them" + replaces="$pkgname" + depends= + for d in usr/lib/lua usr/share/lua; do + if [ -d "$pkgdir"/$d/$_ver ]; then + mkdir -p "$subpkgdir"/$d + mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1 + fi + done } -md5sums="c2f13ef8e1fb83af43d61586ff611957 lua-subprocess-0.0.20121211.tar.gz -4e16e1e15c3625a739b9ccff15341895 luafileobject.patch -fa869a7c9a11faf77ad9fd98ba35f62a openexception.patch -65e10847e5b8dccc1053d69855f6fc76 makefile.patch" +for _i in $_luaversions; do + eval "split_${_i/./_}() { _split $_i; }" +done + +md5sums="a2ab629c701eba6f3300405daf104f1d lua-subprocess-0.0.20141229.tar.gz +f1e3718f4bcc74c7903354c5ddab0229 makefile.patch" +sha256sums="6d58417d9e2791408092ec2b232072c0461343954d3f72ee6943b0103ac6ce20 lua-subprocess-0.0.20141229.tar.gz +0f99c91db81e4dc2d3f49fdb6ab4bc6970f369752f2092c286456c6641ada1f3 makefile.patch" +sha512sums="5d0648a883102172bc086a0054f76832d25ce760149f0e0ddac927a325815b1937e780efc5d553bb6b751ed7642d728ff37745be134dfdb42753bde3b338a1b9 lua-subprocess-0.0.20141229.tar.gz +86cccb94ad5bf13c0ce85bc61d899f83d48ee46f06f8a49ef1f720c08a055165c2cb1b5b0596f8d14a237bcab7f2de7e9b2f2ecb11441802e07e6baa01d50b1f makefile.patch" |