summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b7b2053dec9af0319f635fe34e8f90950bd4965 (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
# Maintainer: John Jenkins <twodopeshaggy@gmail.com>
# Contributer: Magnus Woldrich <trapd00r@trapd00r.se>
pkgname=colortest-256-ng-git
pkgver=20100822
pkgrel=1
pkgdesc="Gives a visual presentation of what the 256 colors indexes is and how \ 
         they look"
arch=('any')
url="http://github.com/trapd00r/colortest-256-ng.git"
license=('GPLv2')
depends=('perl' 'perl-term-extendedcolor' 'perl-term-extendedcolor-xresources')
makedepends=('git')
source=()
md5sums=() 

_gitroot="git://github.com/trapd00r/colortest-256-ng.git"
_gitname="colortest-256-ng"

package() {
  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"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  mkdir -p $pkgdir/usr/bin

  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

  { perl Makefile.PL &&
    make &&
    make install; } || return 1

}