43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=perl-list-utilsby
|
|
_cpanname=List-UtilsBy
|
|
pkgver=0.11
|
|
pkgrel=1
|
|
pkgdesc="Higher-order list utility functions"
|
|
arch=('any')
|
|
url="https://search.cpan.org/~pevans/$_cpanname"
|
|
license=('GPL-1')
|
|
depends=("perl>=5.5.0")
|
|
options=('!emptydirs')
|
|
source=("https://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_cpanname-$pkgver.tar.gz")
|
|
sha512sums=('7c912b805e1e21d5d683224b63125bc8385d79c7115d88c08ca28fc1778ec8d22ad4aaf366731df438365a5233108926cbffee284c2e2d37346b47984dbbd4c9')
|
|
|
|
# Function to change to the working directory and set
|
|
# environment variables to override undesired options.
|
|
prepareEnvironment() {
|
|
cd "$srcdir/$_cpanname-$pkgver"
|
|
export \
|
|
PERL_MM_USE_DEFAULT=1 \
|
|
PERL_AUTOINSTALL=--skipdeps \
|
|
PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='"$pkgdir"'" \
|
|
PERL_MB_OPT="--installdirs vendor --destdir '"$pkgdir"'" \
|
|
MODULEBUILDRC=/dev/null
|
|
}
|
|
|
|
build() {
|
|
prepareEnvironment
|
|
/usr/bin/perl Makefile.PL
|
|
make
|
|
}
|
|
|
|
package() {
|
|
prepareEnvironment
|
|
make install
|
|
|
|
# Remove "perllocal.pod" and ".packlist".
|
|
find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
|
|
|
|
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
|
|
}
|