summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c7842f2e1ce1c8ed130cdcc330acb7eae0a6a1f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Maintainer:  Eugeni Dodonov <eugeni@dodonov.net>

pkgname=powerstat-git
pkgver=20120328
pkgrel=1
pkgdesc="a tool for measuring a laptops power usage via the battery"
arch=(i686 x86_64)
url="http://kernel.ubuntu.com/git?p=cking/powerstat.git"
license=(GPL)
depends=(glibc)
makedepends=(make)

provides=('powerstat')

_gitroot=git://kernel.ubuntu.com/cking/powerstat.git
_gitname=powerstat

build() {
  cd ${srcdir}
  if [ -d $_gitname ] ; then
    ( cd $_gitname && git pull ) 
  else
    git clone $_gitroot
  fi
  
  rm -rf "${_gitname}_build"
  cp -r "${_gitname}" "${_gitname}_build"
  
  cd "${_gitname}_build/"
  make
}

package() {
  cd "$srcdir/${_gitname}_build"
  make DESTDIR="$pkgdir/" install
}