Skip to content

Instantly share code, notes, and snippets.

@bbidulock bbidulock/PKGBUILD
Created Jun 10, 2017

Embed
What would you like to do?
PKGBUILD for perl-text-csv-xs
# Contributor: John D Jones III AKA jnbek <jnbek1972 -_AT_- g m a i l -_Dot_- com>
# Generator : CPANPLUS::Dist::Arch 1.32
pkgname='perl-text-csv-xs'
_cpanname='Text-CSV_XS'
pkgver='1.30'
pkgrel='1'
pkgdesc="comma-separated values manipulation routines"
arch=('i686' 'x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
makedepends=()
checkdepends=('perl-test-pod' 'perl-test-pod-coverage')
url="https://metacpan.org/release/${_cpanname}"
source=("https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/${_cpanname}-${pkgver}.tgz")
md5sums=('1d9851c15a88eda9c4babf5addd0d169')
sha512sums=('f627478a719b0bf7a96b7142520d22af286595f218e535f2a4e6c950d7c1a005b948b519d30daa77566096b0a0d34b4669750b2d7359193c3916b29dc77c85df')
_distdir="${_cpanname}-${pkgver}"
build() {
( 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
cd $_distdir
/usr/bin/perl Makefile.PL
make
)
}
check() {
cd $_distdir
( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
make test
)
}
_perl_depends() {
# template start; name=perl-binary-module-dependency; version=1;
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
fi
# template end;
}
package() {
cd $_distdir
make install
find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
_perl_depends
}
# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.