updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / dwm-hg / PKGBUILD
blob60e4f142ea0e22d0e50e3be06b6752654533d52b
1 # Contributer: v2punkt0 <v2punkt0@gmail.com>
3 pkgname='dwm-hg'
4 pkgver=1358
5 pkgrel=1
6 pkgdesc="The latest hg pull of dwm"
7 url="http://dwm.suckless.org"
8 license='MIT'
9 arch=('i686' 'x86_64')
10 depends=('libx11')
11 makedepends=('mercurial' 'sed')
12 conflicts=('dwm')
13 provides=('dwm')
14 source=()
15 md5sums=()
17 _hgroot='http://code.suckless.org/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         # add correct settings to config.mk
34         sed -i "s|^PREFIX =.*|PREFIX = /usr|" config.mk
35         sed -i "s|^X11INC =.*|X11INC = /usr/include/X11|" config.mk
36         sed -i "s|^X11LIB =.*|X11LIB = /usr/lib/X11|" config.mk
38         msg "Starting build process."
39         make || return 1
40         make PREFIX=$startdir/pkg/usr install
42         mkdir -p $startdir/pkg/usr/share/licenses/dwm
43         cp LICENSE $startdir/pkg/usr/share/licenses/dwm