[aur-general] Perl PKGBUILD review

François Freitag mail at franek.fr
Sat Dec 2 21:02:31 UTC 2017


Hi all,

I'm new to Perl packaging. I wrote my first PKGBUILD [1] following the
wiki [2].
I would be very grateful if somebody could give it a read and suggest
improvements? namcap does not emit any warning.

|# Maintainer: François Freitag <mail at franek dot fr> # Contributor:
Victor van den Elzen <victor.vde at gmail dot com> pkgname=pgbadger
pkgver=9.2 pkgrel=4 pkgdesc="A fast PostgreSQL Log Analyzer"
arch=("any") url="https://github.com/dalibo/pgbadger"
license=("custom:Dalibo") depends=('perl>=5.10.0') optdepends=(
"perl-text-csv-xs: parse PostgreSQL CSV log files" "perl-json-xs: export
statistics as JSON file" ) options=('!emptydirs')
source=("https://github.com/dalibo/pgbadger/archive/v${pkgver}.tar.gz")
sha256sums=('2107466309a409fb9e40f11bb77cac1f9ba7910d5328e7b2e08eb7a1c6d760ec')
prepare() { # Override perl command line options we don't want. Source:
# https://wiki.archlinux.org/index.php/Perl_Policy#Vendor export
PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \ PERL5LIB=""
PERL_LOCAL_LIB_ROOT="" \ MODULEBUILDRC=/dev/null } build() { cd
"${srcdir}/pgbadger-${pkgver}" /usr/bin/perl Makefile.PL make }
package() { cd "${srcdir}/pgbadger-${pkgver}" install -Dm644 LICENSE -t
"${pkgdir}/usr/share/licenses/${pkgname}" make pure_vendor_install
INSTALLDIRS=vendor DESTDIR="${pkgdir}" # Remove perllocal.pod and
.packlist find "${pkgdir}" \( -name .packlist -o -name perllocal.pod \)
-delete } |


Thank you for your time,
François

[1] https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pgbadger
[2] https://wiki.archlinux.org/index.php/Perl_Policy#Vendor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20171202/53e4e22a/attachment.asc>


More information about the aur-general mailing list