summaryrefslogtreecommitdiffstats
path: root/nosr-git/PKGBUILD
blob: f8388311790b946d548afa7079ed38ec572cd2e0 (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
# Contributor: Dave Reisner <d@falconindy.com>

pkgname=nosr-git
pkgver=20110901
pkgrel=1
pkgdesc="search for files in uninstalled packages"
arch=('i686' 'x86_64')
url="http://github.com/falconindy/nosr"
license=('MIT')
depends=('libarchive' 'curl' 'pcre' 'pacman')
makedepends=('git' 'perl')
conflicts=('nosr')
provides=('nosr')

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

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"

  make
}

package() {
  cd "$srcdir/$_gitname-build"
  make PREFIX=/usr DESTDIR="$pkgdir" install
}

# vim: ft=sh syn=sh et