updated on Sun Jan 22 08:00:21 UTC 2012
[aur-mirror.git] / 2wm-hg / PKGBUILD
blob862f7c715174b740563779ac7240079e03fded8e
1 # Maintainer: Ryan Stephenson <rycs42 gmail com>
3 pkgname=2wm-hg
4 pkgver=16
5 pkgrel=1
6 pkgdesc="Dual window manager prototype - The latest hg pull"
7 url="http://hg.suckless.org/2wm/"
8 arch=('i686' 'x86_64')
9 license=('MIT')
10 depends=('libx11')
11 makedepends=('mercurial' 'sed')
12 conflicts=('2wm')
13 provides=('2wm')
15 _hgroot='http://code.suckless.org/hg'
16 _hgrepo='2wm'
18 build() {
19         cd $startdir/src
21         # Update the repo, else clone a new one
22         if [ -d $_hgrepo ]; then
23                 cd $_hgrepo
24                 make clean
25                 hg pull -u
26         else
27                 hg clone ${_hgroot}/${_hgrepo}
28                 cd $_hgrepo
29         fi
31         # Add correct settings to config.mk
32         sed -i "s|^PREFIX =.*|PREFIX = /usr|" config.mk
33         sed -i "s|^X11INC =.*|X11INC = /usr/include/X11|" config.mk
34         sed -i "s|^X11LIB =.*|X11LIB = /usr/lib/X11|" config.mk
36         msg "Starting build process."
37         make || return 1
38         make PREFIX=$startdir/pkg/usr install
40         mkdir -p $startdir/pkg/usr/share/licenses/2wm
41         cp LICENSE $startdir/pkg/usr/share/licenses/2wm