aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-openrc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-10-15 11:38:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-10-15 11:48:24 +0000
commit7f521bc25431acd7926cd00bba4d4c46a62812f7 (patch)
tree2af5c4bc8ce1915ea3a1cb9c075de1c02811bb1f /main/lua-openrc
parent3fdea8dbdd76a067164f460586bb91b0aad5dac5 (diff)
downloadaports-7f521bc25431acd7926cd00bba4d4c46a62812f7.tar.bz2
aports-7f521bc25431acd7926cd00bba4d4c46a62812f7.tar.xz
main/lua-openrc: upgrade to 0.2 and add lua 5.2 support
Diffstat (limited to 'main/lua-openrc')
-rw-r--r--main/lua-openrc/APKBUILD61
1 files changed, 45 insertions, 16 deletions
diff --git a/main/lua-openrc/APKBUILD b/main/lua-openrc/APKBUILD
index a0f371a65d..e4e579bf60 100644
--- a/main/lua-openrc/APKBUILD
+++ b/main/lua-openrc/APKBUILD
@@ -1,33 +1,62 @@
-# Contributor:
-# Maintainer:
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+_luaversions="5.1 5.2"
pkgname=lua-openrc
-pkgver=0.1
-pkgrel=4
+pkgver=0.2
+pkgrel=0
pkgdesc="Lua module for OpenRC"
-url="http://git.alpinelinux.org/cgit/lua-openrc/"
+url="https://github.com/ncopa/lua-openrc"
arch="all"
license="GPL"
-depends=lua
-makedepends="lua-dev openrc-dev"
+depends="lua5.1-openrc"
install=
-subpackages=
-source="http://git.alpinelinux.org/cgit/lua-openrc.git/snapshot/lua-openrc-$pkgver.tar.bz2"
+makedepends="openrc-dev"
+subpackages=""
+for _i in $_luaversions; do
+ makedepends="$makedepends lua$_i-dev"
+ subpackages="$subpackages lua$_i-openrc:split_${_i/./_}"
+done
+source="lua-openrc-$pkgver.tar.gz::https://github.com/ncopa/lua-openrc/archive/v$pkgver.tar.gz"
-_builddir="$srcdir"/$pkgname-$pkgver
+_sdir="$srcdir"/$pkgname-$pkgver
prepare() {
- cd "$_builddir"
+ for _i in $_luaversions; do
+ cp -r "$_sdir" "$srcdir"/build-$_i || return 1
+ done
}
build() {
- cd "$_builddir"
- make || return 1
+ for _i in $_luaversions; do
+ cd "$srcdir"/build-$_i
+ make LUA_VERSION=$_i || return 1
+ done
}
package() {
- cd "$_builddir"
- install -Dm755 rc.so "$pkgdir"/usr/lib/lua/5.1/rc.so
+ for _i in $_luaversions; do
+ install -Dm755 "$srcdir"/build-$_i/rc.so \
+ "$pkgdir"/usr/lib/lua/$_i/rc.so || return 1
+ done
}
-md5sums="9a9ace6b5567179852b1ee04196a0ec3 lua-openrc-0.1.tar.bz2"
+_split() {
+ local d= _ver=$1
+ pkgdesc="Lua $_ver module for OpenRC"
+ 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
+}
+
+for _i in $_luaversions; do
+ eval "split_${_i/./_}() { _split $_i; }"
+done
+
+md5sums="764b4ec74d059541acc4bd3fb8581c1c lua-openrc-0.2.tar.gz"
+sha256sums="f7e961386783c6a73301bb0342a7c2c799c34464daff4a3125c6eaf463e251e5 lua-openrc-0.2.tar.gz"
+sha512sums="f560cbef63d7d1565dacd9ec2f8dc91d4c08397dfcd546dd446d3834caef8d545cab6d0b7ea5a095090e3069935eb9adfa35e75414d7dcfa2ae8951186221970 lua-openrc-0.2.tar.gz"