updated on Fri Jan 13 20:02:10 UTC 2012
[aur-mirror.git] / perl-cpanplus-dist-arch-git / PKGBUILD
blob1dba95a46456d036ea12b32fc4945fa6b362d6ac
1 # Contributor: Justin Davis <jrcd83@gmail.com>
2 pkgname='perl-cpanplus-dist-arch-git'
3 pkgver='20100510'
4 pkgrel='1'
5 pkgdesc='Newest developer release for CPANPLUS::Dist::Arch'
6 arch=('any')
7 license=('PerlArtistic' 'GPL')
8 options=('!emptydirs')
9 makedepends=('perl-test-pod-coverage' 'perl-test-pod')
10 depends=('perl')
11 provides=('perl-cpanplus-dist-arch')
12 url='http://github.com/juster/perl-cpanplus-dist-arch'
13 md5sums=()
14 source=()
16 _gitroot='git://github.com/juster/perl-cpanplus-dist-arch.git'
17 _gitname='master'
19 build() {
20   DIST_DIR="${srcdir}/${pkgname}"
21   msg 'Creating CPANPLUS::Dist::Arch developer package...'
23   if [ -d "$DIST_DIR" ] ; then
24     warning 'Repository directory already exists!'
25     msg2 'Attempting to pull from repo and checkout master...'
26     cd "$DIST_DIR"
27     git pull "$_gitroot" "$_gitname"
28     git checkout master
29   else
30     msg2 "Cloning $_gitroot repository..."
31     git clone "$_gitroot" "$DIST_DIR"
32   fi
34   export PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
35     MODULEBUILDRC='/dev/null' TEST_RELEASE=1
37   msg 'Building CPANPLUS::Dist::Arch...'
38   { cd "$DIST_DIR"  &&
39     perl Build.PL   &&
40     perl Build      &&
41     msg2 'Testing CPANPLUS::Dist::Arch...' &&
42     perl Build test &&
43     perl Build install; } || return 1;
45   find "$pkgdir" -name .packlist -o -name perllocal.pod -delete