mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-30 13:51:31 +01:00
66 lines
1.9 KiB
Plaintext
66 lines
1.9 KiB
Plaintext
# 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="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="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="7e438db4b40e8d067de78581e55fbeb2 2015.04.10.zip"
|
|
sha256sums="eaef1a1d9a20adb55c5eef81de3dea25120fde8a02e3307bd86a9ba1af0791aa 2015.04.10.zip"
|
|
sha512sums="b047173647d430cc80526d2a0c92cc1ae1006c068d57362ece2ae2e9dac550b7e55446748def1cb2c73930026f4048f9581721f2768ac79df9946483d94c09e3 2015.04.10.zip"
|