1 # -*- Mode: shell-script; sh-basic-offset: 2 -*-
2 # Contributor: Justin Davis <jrcd83@gmail.com>
3 pkgname='perl-alpm-git'
6 pkgdesc='Developer release for ALPM perl module'
8 license=('PerlArtistic' 'GPL')
11 provides=('perl-alpm')
12 url='http://github.com/juster/perl-alpm'
16 _gitroot='git://github.com/juster/perl-alpm.git'
17 _gitbranch=${BRANCH:-'master'}
20 DIST_DIR="${srcdir}/${pkgname}"
21 msg 'Creating ALPM developer package...'
23 if [ -d "$DIST_DIR" ] ; then
24 warning 'Repository directory already exists!'
25 msg2 'Attempting to pull from repo...'
27 git pull origin "$_gitbranch"
29 msg2 "Cloning $_gitroot repository..."
30 git clone "$_gitroot" "$DIST_DIR"
34 msg2 "Checking out the $_gitbranch branch..."
35 git checkout "$_gitbranch"
36 if [ "$?" -ne 0 ] ; then
37 error "Failed to checkout the $_gitbranch branch... aborting."
41 export PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR=$pkgdir" \
42 PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
43 MODULEBUILDRC='/dev/null' TEST_RELEASE=1
45 msg 'Building ALPM...'
49 msg2 'Testing ALPM...' &&
54 find "$pkgdir" -name .packlist -o -name perllocal.pod -delete