updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / dwm-gtx-hg / PKGBUILD
blob918f4239d24d11f7190fd4c522043de6a3907eda
1 # Contributor: Thomas Dahms <thdahms@gmx.de>
3 pkgname='dwm-gtx-hg'
4 pkgver=1434
5 pkgrel=1
6 pkgdesc="The latest hg pull of dwm-gtx, a branch of dwm, with improved layouts and Xinerama support"
7 url="http://s01.de/~gottox/index.cgi/proj_dwm"
8 license='MIT'
9 arch=('i686' 'x86_64')
10 depends=('libx11')
11 makedepends=('mercurial' 'sed')
12 conflicts=('dwm' 'dwm-hg' 'dwm-gtx')
13 provides=('dwm' 'dwm-gtx')
14 source=()
15 md5sums=()
17 _hgroot='http://s01.de/~gottox/hg'
18 _hgrepo='dwm'
20 build() {
21         cd $startdir/src
23         # update the repo, else clone a new one
24         if [ -d $_hgrepo ]; then
25                 cd $_hgrepo
26                 make clean
27                 hg pull -u
28         else
29                 hg clone ${_hgroot}/${_hgrepo}
30                 cd $_hgrepo
31         fi
33         # include custom config.h, if it exists. Note that default
34         # config.def.h will be used if not
35         if [ -f $startdir/config.h ]; then
36           cp $startdir/config.h .
37         fi
39         # add correct settings to config.mk
40         sed -i "s|^PREFIX =.*|PREFIX = /usr|" config.mk
41         sed -i "s|^X11INC =.*|X11INC = /usr/include/X11|" config.mk
42         sed -i "s|^X11LIB =.*|X11LIB = /usr/lib/X11|" config.mk
44         msg "Starting build process."
45         make || return 1
46         make PREFIX=$startdir/pkg/usr install
48         mkdir -p $startdir/pkg/usr/share/licenses/dwm
49         cp LICENSE $startdir/pkg/usr/share/licenses/dwm