updated on Wed Jan 25 00:20:47 UTC 2012
[aur-mirror.git] / qbat-git / PKGBUILD
blob7ff2a2ce83fb06961300aed5a14cfa1f4b9a157b
1 # Contributor: Marco Tangaro <marco_tangaro@hotmail.com>
3 pkgname=qbat-git
4 pkgver=20100207
5 pkgrel=1
6 pkgdesc="A small tool based on Qt4 to display battery stats in system tray"
7 arch=('i686' 'x86_64')
8 url="http://repo.or.cz/w/qbat.git"
9 license=('GPL2')
10 depends=('qt')
11 makedepends=('git' 'cmake')
12 source=()
13 md5sums=()
15 _gitroot="git://repo.or.cz/qbat.git"
16 _gitname="qbat"
18 build() {
19 cd "$srcdir"
20 msg "Connecting to GIT server...."
22 if [ -d $srcdir/$_gitname ] ; then
23 (cd $_gitname && git pull origin)
24 msg "The local files are updated."
25 else
26 git clone $_gitroot
29 msg "GIT checkout done or server timeout"
30 msg "Starting make..."
32 rm -rf "$srcdir/$_gitname-build"
33 git clone $_gitname $_gitname-build
34 cd "$_gitname-build"
36 sed -i '1a\#include <cstdio>' common.cpp >t 
38 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr . || return 1
39 make || return 1
40 make DESTDIR=$pkgdir install || return 1
42 install -Dm755 qbat $pkgdir/usr/bin/qbat
43 install -Dm644 res/qbat.png $pkgdir/usr/share/qbat/icons/qbat.png
44 install -m644 res/qbat2.svg $pkgdir/usr/share/qbat/icons/qbat2.svg
45 install -Dm644 qbat.desktop $pkgdir/usr/share/applications/qbat.desktop