updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / cwm-git / PKGBUILD
blobd4767fe582976d3dc0e7c07f72275c8f018387ef
1 # Maintainer: Christian Neukirchen <chneukirchen@gmail.com>
2 pkgname=cwm-git
3 pkgver=20111005
4 pkgrel=1
5 pkgdesc="OpenBSD fork of calmwm, a clean and lightweight window manager"
6 arch=(i686 x86_64)
7 url="http://www.openbsd.org/cgi-bin/man.cgi?query=cwm&sektion=1"
8 license=('custom')
9 depends=(libxft libxrandr libxinerama)
10 makedepends=(git pkg-config)
11 replaces=(cwm cwm-cvs)
12 conflicts=(cwm cwm-cvs)
13 source=(cwm.desktop)
14 md5sums=('42530ce5a23fc5f9088d891e325d99bd')
16 _gitroot="git://github.com/chneukirchen/cwm.git"
17 _gitname=cwm
18 _gitbranch=linux
20 build() {
21   cd "$srcdir"
22   msg "Connecting to GIT server...."
24   if [ -d $_gitname ] ; then
25     cd $_gitname && git fetch origin
26     msg "The local files are updated."
27   else
28    git clone --mirror  $_gitroot $_gitname
29   fi
31   msg "GIT checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "$srcdir/$_gitname-build"
35   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
36   cd "$srcdir/$_gitname-build"
37   git checkout $_gitbranch
39   make
42 package() {
43   cd "$srcdir/$_gitname-build"
45   make DESTDIR="${pkgdir}" PREFIX=/usr install
46   install -D -m644 "${srcdir}/cwm.desktop" "${pkgdir}/usr/share/xsessions/cwm.desktop"
47   install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"