summaryrefslogtreecommitdiff
path: root/pcr/wmii-hg/PKGBUILD
blob: ce1e68b93390697fac069b736c5606d7515d7aec (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
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

# Maintainer (AUR): N30N <archlinux@alunamation.com>
# Contributor (Arch): Anthony Martin <ality@pbrane.org>
# Contributer (Arch): thomasd <thdahms@gmx.de>
# Contributer (Arch): karnath <karnath@pop3.ru>
# Contributer (Arch): MrBougo <bougospam@gmail.com>
# Contributor (Arch): Wolf Ramovsky <wolf.ramovsky@gmail.com>

pkgname=wmii-hg
pkgver=2813
pkgdesc="A small, dynamic window manager for X11"
url="https://code.google.com/p/wmii/"
license=("MIT")

provides=("wmii")
conflicts=("wmii")

pkgrel=1
arch=("i686" "x86_64")
depends=('libxft' 'libxrandr' 'libxinerama')
makedepends=('txt2tags' 'libixp') # libixp is statically linked

source=("libre://${pkgname}-${pkgver}.tar.gz")
md5sums=('74eb9f91000321b587e7826be999d4de')

mkdepends=('mercurial')
mksource=("$pkgname-$pkgver::hg+https://code.google.com/p/wmii/#revision=${pkgver}")
mkmd5sums=('SKIP')
mksource() {
	# don't include this precompiled binary (probably included by accident)
	rm "${srcdir}/${pkgname}-${pkgver}/lib/libutf/libutf.a"
}

build() {
	cd "$srcdir/$pkgname-$pkgver"

	export LDFLAGS+=',--no-as-needed'
	sed -i 's|PREFIX = /usr/local|PREFIX = /usr|' config.mk
	sed -i 's|ETC = $(PREFIX)/etc|ETC = /etc|' config.mk
	sed -i 's|PYTHON = .*|PYTHON = python2|' config.mk
	echo 'CFLAGS += -O2' >> config.mk
	sed -i 's# !=#!=#' mk/hdr.mk

	export MAKEFLAGS="-j1"
	make
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir" install

	install -Dm644 img/wmii.png "${pkgdir}"/usr/share/pixmaps/wmii.png
	install -Dm644 debian/file/wmii.desktop "${pkgdir}"/usr/share/xsessions/wmii.desktop
	install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}