[aur-general] Help with a perl package needed

Justin Davis jrcd83 at gmail.com
Tue Aug 24 23:07:26 EDT 2010

Hey Philip,

Sorry for the delay I have looked at your AUR PKGBUILD and it looks very well done. I can see you read the wiki page. Filling all those pkgdeps by hand is very impressive. I have some minor suggestions and a plug for a module I made that may help you.

One discrepancy I noticed is that I think perl-anyevent should be >= 5, meaning the package needs at least version 5. You might also consider having a provides line like: provides=('perl-audio-nama'). This is the more or less "standard" way of naming perl _module_ packages. Since your package provides both a module and application, naming it 'nama' isn't bad at all, but the provides would allow people to use the standard notation if they want to depend on the module. Not really important but just for covering your bases.

The plug is that I have made a module for generating Archlinux package for perl modules on the fly. It is not perfect though and sometimes you have to tweak the PKGBUILD. My module is called CPANPLUS::Dist::Arch, available as perl-cpanplus-dist-arch on the AUR. It comes with a program called "cpan2aur" that can generate PKGBUILDs, upload them to the AUR, or check if a new version of a module is available automatically.

To keep a long story short, if you want help maintaining your AUR package and keeping it up to date you might find it useful. I use it for my AUR perl packages. But to keep the PKGBUILD perfect like you made it you would have to use a PKGBUILD template file. If you want to try it here are instructions:

Create a directory called 'nama'. I have such dirs under my ~/aur directory. Copy this PKGBUILD template file to a file called PKGBUILD.tt:

# CPAN Name  : Audio-Nama
# Maintainer : [% packager %]
# Generator  : CPANPLUS::Dist::Arch [% version %]
pkgver='[% pkgver %]'
pkgrel='[% pkgrel %]'
pkgdesc='Tk/CLI frontend for ecasound'
arch=('[% arch %]')
depends=([% depends %])
optdepends=('perl-audio-ecasound' 'perl-tk')
source=('[% source %]')
md5sums=('[% md5sums %]')

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'" \

  { cd "$DIST_DIR" &&
    perl Makefile.PL &&
    make &&
    [% IF skiptest %]#[% END %]make test &&
    make install;
  } || return 1;

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete

'cd' back into the parent directory and type: 'cpan2aur nama'. This will build a new source package file, generating a PKGBUILD from your template. Then type 'cpan2aur --check nama' to automatically check if a new version of Audio-Name from CPAN is available and automatically upload the new version of the source package. Or you can do things like 'cpan2aur --upload nama' to generate/upload a source package from that directory's PKGBUILD.tt

I hope that helps you. I don't have steady internet lately so I might not reply instantly if you need me but thanks for your AUR package!


On Aug 22, 2010, at 2:56 PM, Philipp Überbacher wrote:
> I think I have it correct now, but I wouldn't mind someone testing it or
> making suggestions.
>  nama
>  http://aur.archlinux.org/packages.php?ID=40133
>  nama git version
>  http://aur.archlinux.org/packages.php?ID=40135
>  perl audio ecasound
>  http://aur.archlinux.org/packages.php?ID=40136
>  Regards,
> -- 
> Philipp
> --
> "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu
> und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan

More information about the aur-general mailing list