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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Mathias R. Larsen <tripox@tripox.dk>
# Little help from: Anthony Caccia <acaccia@ulb.ac.be>

pkgname=xbattbar-acpi
pkgver=0.4.0
pkgrel=3
pkgdesc="A simple battery indicator bar"
arch=('any')
url="https://github.com/aravind/xbattbar-acpi.git"
license=('GPL2')
groups=()
depends=('libacpi' 'xosd')
makedepends=()
optdepends=()
conflicts=()
replaces=()

_gitroot='https://github.com/aravind/xbattbar-acpi.git'
_gitname='xbattbar-acpi'

md5sums=('9b6cc8c801c3c6a79e131bfc6ce2f437')

build() {
  cd "$srcdir"
  msg "Connecting to GIT server..."

  if [[ -d "$_gitname" ]]; then
      cd "$_gitname" && git pull origin
      msg "Local files updated !"
  else
      git clone "$_gitroot" "$_gitname"
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  make
}

package() {
  cd "$srcdir/$pkgname-build"
  install -Dm755 xbattbar-acpi ${pkgdir}/usr/bin/xbattbar-acpi
  install -Dm644 xbattbar-acpi.1 ${pkgdir}/usr/share/man/man1/xbattbar-acpi.1.gz
}

# vim:set ts=2 sw=2 et: