Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (62 sloc) 1.96 KB
[%- DEFAULT
arch = ['any']
license = ['PerlArtistic', 'GPL']
options = ['!emptydirs']
skiptest = 0
-%]
# Contributor: [% packager %]
# Generator : CPANPLUS::Dist::Arch [% version %]
# Template @ http://github.com/xenoterracide/AURpan/blob/master/[% pkgname %]/PKGBUILD.tt
# File bugs @ http://github.com/xenoterracide/AURpan/issues
pkgname='[% pkgname %][% IF vcs %]-[% vcs %][% END; IF vcs_branch %]-[% vcs_branch %][% END %]'
pkgver='[% UNLESS vcs %][% pkgver %][% ELSE %][% datepkgver %][% END %]'
pkgrel='[% pkgrel %]'
pkgdesc="[% pkgdesc %]"
arch=('[% arch.join('\' \'') %]')
url='[% url %]'
license=('[% license.join('\' \'') %]')
depends=([% depends %])
[% IF provides -%]provides=('[% provides.join('\' \'') %]')[%- END %]
[% IF replaces -%]replaces=('[% replaces.join('\' \'') %]')[%- END %]
options=('[% options.join('\' \'') %]')
[% UNLESS vcs %]
source=('[% source %]')
md5sums=('[% md5sums %]')
[% END -%]
build() {
DIST_DIR="${srcdir}/[% distdir %]"
export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
PERL_AUTOINSTALL=--skipdeps \
PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
MODULEBUILDRC=/dev/null
{
[% IF vcs == 'git' -%]
if [ -d $DIST_DIR ] ; then
cd $DIST_DIR
perl Build clean
git remote update
git checkout origin/[% IF vcs_branch; vcs_branch; ELSE %]master[% END %]
else
git clone [% vcs_uri %] $DIST_DIR
cd $DIST_DIR
git checkout origin/[% IF vcs_branch; vcs_branch; ELSE %]master[% END %]
fi
[% END -%]
cd "$DIST_DIR" &&
[% IF is_makemaker -%]
perl Makefile.PL &&
make &&
[% UNLESS skiptest %]make test &&[%- END %]
make DESTDIR="$pkgdir" install;
[% END -%]
[%- IF is_modulebuild -%]
perl Build.PL &&
perl Build &&
[% UNLESS skiptest %]perl Build test &&[% END %]
perl Build install;
[% END -%]
} || return 1;
find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
[% content %]
}
Something went wrong with that request. Please try again.