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

# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor (Arch): Jeffrey 'jf' Lim <jfs.world@gmail.com>

pkgname=wmii-hg
pkgver=2823
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=("https://repo.parabola.nu/other/${pkgname}/${pkgname}-${pkgver}.tar.gz")
md5sums=('8228a299cb83258ab3988b6131d2cbb8')

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
}