summaryrefslogtreecommitdiffstats
path: root/cower-git/PKGBUILD
blob: 431e42ce6d9b3cc62e035ef447973d5dad441bbf (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Dave Reisner <d@falconindy.com>

pkgname=cower-git
pkgver=20111016
pkgrel=1
pkgdesc="A simple AUR agent with a pretentious name"
arch=('i686' 'x86_64')
url="http://github.com/falconindy/cower"
license=('MIT')
depends=('curl' 'pacman' 'yajl' )
makedepends=('git' 'perl')
conflicts=('cower')
provides=('cower')

_gitroot="git://github.com/falconindy/cower.git"
_gitname="cower"

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

  if [[ -d $_gitname ]] ; then
    cd "$_gitname" && git pull origin
    msg "The local files are updated."
  else
    git clone "$_gitroot" "$_gitname"
  fi

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

  rm -rf "$srcdir/$_gitname-build"
  cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  readelf -s /usr/lib/libalpm.so | grep -q alpm_find_satisfier &&
    PMCHECK="-D_HAVE_ALPM_FIND_SATISFIER"

  readelf -s /usr/lib/libalpm.so | grep -q alpm_db_register_local &&
    PMCHECK+=" -D_HAVE_ALPM_DB_REGISTER_LOCAL"

  readelf -s /usr/lib/libalpm.so | grep -q alpm_db_get_pkgcache_list &&
    PMCHECK+=" -D_HAVE_ALPM_DB_GET_PKGCACHE_LIST"

  make PMCHECK="$PMCHECK"
}

package() {
  cd "$srcdir/$_gitname-build"

  make PREFIX=/usr DESTDIR="$pkgdir" install
}

# vim: ft=sh syn=sh et