aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-xctrl
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2015-04-15 15:14:19 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2015-04-15 15:14:19 +0000
commit8b1e05fabf963c7f40816ad9a8ded23c3f626bbe (patch)
tree667d94a63e5be993b382fb19c652c0c617e247f0 /main/lua-xctrl
parent7cfe6d42f2b49b8f20074fc05150ac57d96f5696 (diff)
downloadaports-8b1e05fabf963c7f40816ad9a8ded23c3f626bbe.tar.bz2
aports-8b1e05fabf963c7f40816ad9a8ded23c3f626bbe.tar.xz
main/lua-xctrl: added support versioning and use install_if
Diffstat (limited to 'main/lua-xctrl')
-rw-r--r--main/lua-xctrl/APKBUILD52
1 files changed, 38 insertions, 14 deletions
diff --git a/main/lua-xctrl/APKBUILD b/main/lua-xctrl/APKBUILD
index 4cac6169eb..23ad1baca5 100644
--- a/main/lua-xctrl/APKBUILD
+++ b/main/lua-xctrl/APKBUILD
@@ -1,41 +1,65 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-xctrl
-pkgver=2013.06.20
+pkgver=2015.04.10
_x=${pkgver%%.*}
_y=${pkgver%.*}
_y=${_y#*.}
_z=${pkgver##*.}
_ver=${_x}-${_y}-${_z}
-pkgrel=1
+pkgrel=2
+_luaversions="5.1 5.2 5.3"
pkgdesc="Lua module that allows you to query and manipulate various aspects of an X11 window manager"
url="https://github.com/yetanothergeek/xctrl"
arch="all"
license="GPL-2"
depends=
makedepends="lua-dev libx11-dev libxmu-dev"
+for _i in $_luaversions; do
+ makedepends="$makedepends lua$_i-dev"
+ subpackages="$subpackages lua$_i-xctrl:split_${_i/./_}"
+done
install=
subpackages="$pkgname-doc"
-source="http://xctrl.googlecode.com/files/xctrl-$_ver.tar.gz"
+source="https://github.com/yetanothergeek/xctrl/archive/$pkgver.zip"
-_builddir="$srcdir"/xctrl-$_ver
+_builddir="$srcdir"/xctrl-$pkgver
_lua_libdir=/usr/lib/lua/5.1
+
prepare() {
cd "$_builddir"
}
build() {
- cd "$_builddir"
- export EXTRA_CFLAGS="-fPIC"
- make || return 1
+ for _i in $_luaversions; do
+ msg "Build for Lua $_i"
+ cd "$_builddir"
+ export EXTRA_CFLAGS="-fPIC"
+ make LUAPKG="lua$_i" || return 1
+ done
}
package() {
- cd "$_builddir"
- install -d "$pkgdir"/$_lua_libdir "$pkgdir"/usr/share/doc/$pkgname
- install src/xctrl.so "$pkgdir"/$_lua_libdir/xctrl.so
- install doc/lxctrl.html "$pkgdir"/usr/share/doc/$pkgname/lxctrl.html
+ cd "$_builddir"
+ for _i in $_luaversions; do
+ install -d "$pkgdir"/usr/lib/lua/$_i "$pkgdir"/usr/share/doc/$pkgname
+ install src/xctrl.so "$pkgdir"/usr/lib/lua/$_i/xctrl.so
+ install doc/lxctrl.html "$pkgdir"/usr/share/doc/$pkgname/lxctrl.html
+ done
}
-md5sums="789f39228436e4c806911c6cbaae444a xctrl-2013-06-20.tar.gz"
-sha256sums="9089ff10f5396e0a74b3f80c03d8f54395219d72f6ea0084e2858d7195ececbf xctrl-2013-06-20.tar.gz"
-sha512sums="ebfbd3b13c0d5432c71afa6bc70984c794242204c9ce9eaaf391092f7cf5c99dbe0c66335bb9c97413d304f1f77529bddf6a0f37fb10eeab5fbcb7d75dc92d48 xctrl-2013-06-20.tar.gz"
+_split() {
+ local d=usr/lib/lua _ver=$1
+ pkgdesc="$pkgdesc for Lua $_ver"
+ install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
+ depends=
+ mkdir -p "$subpkgdir/$d" || return 1
+ mv "$pkgdir/$d/$1" "$subpkgdir/$d"
+}
+
+for _v in $_luaversions; do
+ eval "split_${_v/./_}() { _split $_v; }"
+done
+
+md5sums="7e438db4b40e8d067de78581e55fbeb2 2015.04.10.zip"
+sha256sums="eaef1a1d9a20adb55c5eef81de3dea25120fde8a02e3307bd86a9ba1af0791aa 2015.04.10.zip"
+sha512sums="b047173647d430cc80526d2a0c92cc1ae1006c068d57362ece2ae2e9dac550b7e55446748def1cb2c73930026f4048f9581721f2768ac79df9946483d94c09e3 2015.04.10.zip"