blob: b407521e2c8033c515e8488015ab6f90281eaafa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-xctrl
pkgver=2015.04.10
_x=${pkgver%%.*}
_y=${pkgver%.*}
_y=${_y#*.}
_z=${pkgver##*.}
_ver=${_x}-${_y}-${_z}
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="GPL2"
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="https://github.com/yetanothergeek/xctrl/archive/$pkgver.zip"
_builddir="$srcdir"/xctrl-$pkgver
_lua_libdir=/usr/lib/lua/5.1
prepare() {
cd "$_builddir"
}
build() {
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"
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
}
_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="36592eb03c8a30cfbaa6c3f420ca9033 2015.04.10.zip"
sha256sums="f1c8b5283580ff5a1b1fa33ca44463f1e63ee0f9219e516e81d9285bd9fe1ea2 2015.04.10.zip"
sha512sums="4121afe03a6cd0491043d919e8765d8034852db347004b112fc3922ffea4a6dd79b19e40a9650ae114ce2cb067c356adb0abc60389e462e0db27cca9d2f6996e 2015.04.10.zip"
|