updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / openbox-multihead-git / PKGBUILD
blobb100d220da05721a167b05513f949ddea53bafd3
1 # Contributor: Andrea Scarpino <andrea@archlinux.org>
2 # Contributor: Lauri Jäntti <janttilauri at gmail.com>
4 pkgname=openbox-multihead-git
5 pkgver=20120112
6 pkgrel=1
7 pkgdesc="A window manager for the X11 windowing system with multihead support"
8 arch=('i686' 'x86_64')
9 license=('GPL')
10 depends=('startup-notification' 'libxml2' 'libxinerama' 'libxrandr' \
11          'libxcursor' 'pango' 'imlib2')
12 optdepends=('pyxdg: for the xdg-autostart script' 'xpybutil: for ob-visible-desks')
13 makedepends=('git' 'docbook-to-man')
14 url="https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD"
15 install=openbox.install
16 options=('!libtool')
17 backup=('usr/etc/xdg/openbox/menu.xml' 'usr/etc/xdg/openbox/rc.xml')
18 conflicts=('openbox' 'openbox-git')
19 provides=('openbox' 'openbox-git')
20 source=()
21 md5sums=()
23 _gitroot="git://github.com/BurntSushi/openbox-multihead.git"
24 _gitname=openbox-multihead
25 _gitbranch="multihead"
27 build() {
28   cd "$srcdir"
29   msg "Connecting to GIT server...."
31   if [ -d $_gitname ]; then
32     cd $_gitname && git pull origin
33     msg "The local files are updated."
34   else
35     git clone $_gitroot
36   fi
38   msg "GIT checkout done or server timeout"
39   msg "Starting make..."
41   if [ -d "$_gitname-build" ]; then
42           rm -r "$srcdir/$_gitname-build"
43   fi
44   cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
45   cd "$srcdir/$_gitname-build"
47   msg "Clone finished, checking out branch $_gitbranch"
48   git checkout $_gitbranch
50   sed -i 's|/usr/bin/env python|/usr/bin/env python2|' \
51           data/autostart/openbox-xdg-autostart
53   ./bootstrap  
54   ./configure --prefix=/usr \
55     --with-x \
56     --enable-startup-notification \
57     --sysconfdir=/etc
58   make || return 1
59   make DESTDIR=${pkgdir} install
60   sed -i "s:startkde:/opt/kde/bin/\0:" ${pkgdir}/usr/share/xsessions/openbox-kde.desktop
61   sed -i "s:=gnome-session:=/usr/bin/gnome-session:" ${pkgdir}/usr/share/xsessions/openbox-gnome.desktop
62   install -Dm755 tools/ob-visible-desks "$pkgdir/usr/bin/ob-visible-desks"