summaryrefslogtreecommitdiffstats
path: root/main/lua-xctrl/APKBUILD
blob: 2c3ccbd3c308e2752826bc188afad1ee6018b7dc (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-xctrl
pkgver=2013.06.20
_x=${pkgver%%.*}
_y=${pkgver%.*}
_y=${_y#*.}
_z=${pkgver##*.}
_ver=${_x}-${_y}-${_z}
pkgrel=0
pkgdesc="Lua module that allows you to query and manipulate various aspects of an X11 window manager"
url="http://code.google.com/p/xctrl/"
arch="all"
license="GPL-2"
depends=
makedepends="lua-dev libx11-dev libxmu-dev libiconv-dev"
install=
subpackages="$pkgname-doc"
source="http://xctrl.googlecode.com/files/xctrl-$_ver.tar.gz"

_builddir="$srcdir"/xctrl-$_ver
_lua_libdir=/usr/lib/lua/5.1
prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"
	export EXTRA_CFLAGS="-fPIC"
	[ "$ALPINE_LIBC" != "eglibc" ] && export EXTRA_LDFLAGS="-liconv"
	make || return 1
}

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
}

md5sums="789f39228436e4c806911c6cbaae444a  xctrl-2013-06-20.tar.gz"
sha256sums="9089ff10f5396e0a74b3f80c03d8f54395219d72f6ea0084e2858d7195ececbf  xctrl-2013-06-20.tar.gz"
sha512sums="ebfbd3b13c0d5432c71afa6bc70984c794242204c9ce9eaaf391092f7cf5c99dbe0c66335bb9c97413d304f1f77529bddf6a0f37fb10eeab5fbcb7d75dc92d48  xctrl-2013-06-20.tar.gz"