makedeb


liblwp-useragent-cached-perl 0.08-0


LWP::UserAgent with simple caching mechanism

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for liblwp-useragent-cached-perl.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Moritz Bunkus (AUR) <moritz@bunkus.org>
pkgname='liblwp-useragent-cached-perl'
pkgver='0.08'
pkgrel='0'
pkgdesc="LWP::UserAgent with simple caching mechanism"
arch=('all')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('libwww-perl')
url='https://metacpan.org/release/LWP-UserAgent-Cached'
source=("https://cpan.metacpan.org/authors/id/O/OL/OLEG/LWP-UserAgent-Cached-${pkgver}.tar.gz")
sha512sums=('5c1c18d3a54257aac6f266298d63c4cec9e6c6cbdfe6470cbf02676fc327a9c71238158b08036852c4971787fd8b7b67b85eaa4016687bc6c815a68037e15c47')

prepare_environment() {
  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 "${srcdir}/LWP-UserAgent-Cached-${pkgver}"
}

build() {
  prepare_environment
  /usr/bin/perl Makefile.PL
  make
}

check() {
  prepare_environment
  make test
}

package() {
  prepare_environment
  make install
  find "$pkgdir" "(" -name .packlist -o -name perllocal.pod ")" -delete

  install -m644 -d "$pkgdir/usr/share/doc/$pkgname"
#https://metacpan.org/pod/LWP::UserAgent::Cached#COPYRIGHT
echo "Copyright Oleg G <oleg@cpan.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself." > "$pkgdir/usr/share/doc/$pkgname/copyright"
  install -Dm644 "README" "$pkgdir/usr/share/doc/$pkgname/readme"
  install -Dm644 "Changes" "$pkgdir/usr/share/doc/$pkgname/changelog"
  gzip "$pkgdir/usr/share/doc/$pkgname/changelog"
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et: