summaryrefslogtreecommitdiffstats
path: root/main/openbox/APKBUILD
blob: b786c7eb95b44c697aef2485a29c4faabaeaadd9 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openbox
pkgver=3.5.2
pkgrel=0
pkgdesc="A highly configurable and standards-compliant X11 window manager"
url="http://openbox.org"
arch="all"
license="GPLv2+"
depends=
depends_dev="pango-dev libxml2-dev libxcursor-dev libxrandr-dev libxinerama-dev startup-notification-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-gnome $pkgname-kde"
source="http://openbox.org/dist/openbox/openbox-$pkgver.tar.gz
	http://icculus.org/openbox/tools/setlayout.c"

_builddir="$srcdir"/openbox-$pkgver
prepare() {
	local i
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--disable-static \
		|| return 1
	make || return 1
	gcc $CFLAGS $LDFLAGS -o setlayout "$srcdir"/setlayout.c -lX11 || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	install "$_builddir"/setlayout "$pkgdir"/usr/bin/setlayout
	rm -f "$pkgdir"/usr/lib/*.la
}

libs() {
	pkgdesc="Shared libraries for openbox"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/
}

gnome() {
	pkgdesc="GNOME integration for openbox"
	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/share/xsessions

	mv "$pkgdir"/usr/bin/*gnome* \
		"$pkgdir"/usr/bin/gdm-control \
		"$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/share/*gnome* \
		"$subpkgdir"/usr/share/ || return 1
	mv "$pkgdir"/usr/share/xsessions/*gnome* \
		"$subpkgdir"/usr/share/xsessions/ || return 1
}

kde() {
	pkgdesc="KDE integration for openbox"
	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/share/xsessions

	mv "$pkgdir"/usr/bin/*kde* \
		"$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/share/xsessions/*kde* \
		"$subpkgdir"/usr/share/xsessions/ || return 1
}

md5sums="93df606606053b7e8578a5c116afb8ec  openbox-3.5.2.tar.gz
16ca0d290cae2f4c16a35e9cdfb6f503  setlayout.c"
sha256sums="128fb4ef11f83f6edb1685cfc04f44a16a5322082fc519f9d7cac84fc658af33  openbox-3.5.2.tar.gz
3bfa0b406cd9e4c3d5425711d237e8c701a8b88a927319be0f83428c09a629b2  setlayout.c"
sha512sums="89c58364bc482f2b098341e28b2bbab69a791430ff8924dc0dd6fe56aabadde916d42a4e7dfb47cab21afebd747698e106a19e852444d2ede05e72ef423df09d  openbox-3.5.2.tar.gz
40f7913ecc1b5df9a931ab36a5d4cf47b59eba543fe8b21e4a2724e7cfdfe06814893d8ded8c7a1ce0082126ca89397de0521f9c265a57e376664042b63d612f  setlayout.c"