summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1eb7d7f68ce35f7aec7b76da4df9b571c8312865 (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
55
# Maintainer: Josef Vybíhal <josef.vybihal at gmail dot com>
# Contributor: Jeffrey Tolar <tolar.jeffrey at gmail dot com>
# Contributor: Will Chappell <wtchappell@gmail.com>
# Contributor: denton <e9203.00 gmail com>
# Note: 
pkgname=perl-app-cope
_appname=cope
_dist=App-Cope
pkgver=1.1
pkgrel=5
pkgdesc="A wrapper around programs that output to a terminal, to give them colour for utility and aesthetics while still keeping them the same at the text level."
url=http://stuff.cytzol.org/cope/
arch=(any)
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10' 'perl-class-inspector' 'perl-env-path' 'perl-file-sharedir'
         'perl-io-stty' 'perl-io-tty' 'perl-list-moreutils' 'perl-params-util'
         'perl-regexp-common' 'perl-regexp-ipv6' 'perl-number-format')
makedepends=('git' 'perl-module-install' 'make')
conflicts=($_appname $_appname-git)
provides=($_appname)
install="${pkgname}.install"

source=("${_dist}-${pkgver}::git+https://github.com/xvybihal/cope.git#branch=v1.1")
sha256sums=('SKIP')


build() {
  cd "${srcdir}/${_dist}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  /usr/bin/perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_dist}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  cd "${srcdir}/${_dist}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  make install INSTALLDIRS=vendor DESTDIR=$pkgdir
  
  # Install the 'cope_path' command for use in bash startup scripts.
  mkdir -p $pkgdir/usr/bin
  install -C bin/cope_path.pl $pkgdir/usr/bin/cope_path

  # Clean
  find $pkgdir -name perllocal.pod -delete
  find $pkgdir -name .packlist -delete
}