[aur-general] Help with a perl package needed
Hi, I just remembered that I wrote a PKGBUILD for a perl program a while ago but never made it available to others. I know nothing about perl, so I'm looking for advice. It did build, install and apparently work, but spits a whole lot of errors now. I don't have the slightest idea how to figure out what's wrong now. I had to write PKGBUILDs for a bunch of the dependencies as well, and used CPANPLUS to do that. Thanks to a hint from a fellow archer I noticed that a bunch of those are already provided by the perl package itself. Well, to me this looks like nothing but a huge mess, can you help me clean it up? pkgname=nama pkgver=1.064 pkgrel=1 pkgdesc="Tk/CLI frontend for ecasound" arch=('any') url="http://freeshell.de/~bolangi/cgi1/nama.cgi/00home.html" license=('GPL2') depends=('perl>=5.10.0' 'ladspa' 'ecasound' 'perl-anyevent' 'perl-event' 'perl-parse-recdescent' 'perl-data-section' 'perl-file-find-rule' 'perl-io-all' 'perl-modern-perl' 'perl-term-readline-gnu' 'perl-yaml-tiny' 'perl-file-copy-link' 'perl-graph' 'perl-text') makedepends=() options=(!emptydirs) source=("http://search.cpan.org/CPAN/authors/id/G/GA/GANGLION/Audio-Nama-$pkgver.tar....") md5sums=('59c871d55e175413d0b0cfceb042b775') build() { cd "$srcdir/Audio-Nama-$pkgver" # Setting these env variables overwrites any command-line-options we don't want... 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 # If using Makefile.PL { perl Makefile.PL && make && make test && make install; } || return 1 # remove perllocal.pod and .packlist find "$pkgdir" -name .packlist -o -name perllocal.pod -delete } -- Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan
Excerpts from Philipp's message of 2010-08-22 12:13:02 +0200:
Hi, I just remembered that I wrote a PKGBUILD for a perl program a while ago but never made it available to others. I know nothing about perl, so I'm looking for advice. It did build, install and apparently work, but spits a whole lot of errors now. I don't have the slightest idea how to figure out what's wrong now.
I had to write PKGBUILDs for a bunch of the dependencies as well, and used CPANPLUS to do that.
Thanks to a hint from a fellow archer I noticed that a bunch of those are already provided by the perl package itself.
Well, to me this looks like nothing but a huge mess, can you help me clean it up?
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
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 %] pkgname='nama' pkgver='[% pkgver %]' pkgrel='[% pkgrel %]' pkgdesc='Tk/CLI frontend for ecasound' arch=('[% arch %]') license=('GPL2') options=('!emptydirs') depends=([% depends %]) provides=('perl-audio-nama') optdepends=('perl-audio-ecasound' 'perl-tk') url='http://freeshell.de/~bolangi/cgi1/nama.cgi/00home.html' 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'" \ MODULEBUILDRC=/dev/null { 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! -Justin 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
Excerpts from Justin Davis's message of 2010-08-25 05:07:26 +0200:
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.
Hi Justin, I followed your suggestions and updated the PKGBUILDs accordingly. nama-git: http://aur.archlinux.org/packages.php?ID=40135 nama: http://aur.archlinux.org/packages.php?ID=40133 I don't think anything uses nama as a module, so I rather stick with the current name. Please tell me if you have any more suggestions. I know I didn't use the new build() and package() functions. I'm simply not familiar with those yet, and I don't think they offer any significant benefit.
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 %] pkgname='nama' pkgver='[% pkgver %]' pkgrel='[% pkgrel %]' pkgdesc='Tk/CLI frontend for ecasound' arch=('[% arch %]') license=('GPL2') options=('!emptydirs') depends=([% depends %]) provides=('perl-audio-nama') optdepends=('perl-audio-ecasound' 'perl-tk') url='http://freeshell.de/~bolangi/cgi1/nama.cgi/00home.html' 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'" \ MODULEBUILDRC=/dev/null
{ 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!
-Justin
I did use it already, but I did so sloppily, just to get the job done. perl-audio-ecasound: http://aur.archlinux.org/packages.php?ID=40136 Thanks, -- Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan
On Aug 26, 2010, at 9:43 AM, Philipp Überbacher wrote:
I don't think anything uses nama as a module, so I rather stick with the current name.
Okay it's no biggie. The 'provides' [bash] array in the PKGBUILD just gives aliases for package names. That way packages can essentially have more than one name. But again, it's no big deal as probably no one would use the alias.
I did use it already, but I did so sloppily, just to get the job done. perl-audio-ecasound: http://aur.archlinux.org/packages.php?ID=40136
I just reread this message and realized you were talking about another AUR package. Before I didn't understand and did not respond. It seems that "cpan2aur" found the non-perl "ecasound" dependency properly so you should not need to use a PKGBUILD template. I don't see anything sloppy about it. :) Now that you have used cpan2aur to generate the perl-audio-ecasound package I hope you can use "cpan2aur" to automatically --check for new releases from CPAN and update the AUR accordingly because that was my reason for creating cpan2aur. If you are comfortable with this you may try the same with the nama package as I mentioned earlier. Sorry for the late response. Have fun, Justin
Excerpts from Justin Davis's message of 2010-09-02 02:49:23 +0200:
On Aug 26, 2010, at 9:43 AM, Philipp Überbacher wrote:
I don't think anything uses nama as a module, so I rather stick with the current name.
Okay it's no biggie. The 'provides' [bash] array in the PKGBUILD just gives aliases for package names. That way packages can essentially have more than one name. But again, it's no big deal as probably no one would use the alias.
Thanks, I do provides=('perl-audio-nama') for both nama and nama-git.
I did use it already, but I did so sloppily, just to get the job done. perl-audio-ecasound: http://aur.archlinux.org/packages.php?ID=40136
I just reread this message and realized you were talking about another AUR package. Before I didn't understand and did not respond. It seems that "cpan2aur" found the non-perl "ecasound" dependency properly so you should not need to use a PKGBUILD template. I don't see anything sloppy about it. :)
The sloppy part was at least not putting any packager/maintainer info into it, but it wasn't me, cpan2aur did the job :P
Now that you have used cpan2aur to generate the perl-audio-ecasound package I hope you can use "cpan2aur" to automatically --check for new releases from CPAN and update the AUR accordingly because that was my reason for creating cpan2aur. If you are comfortable with this you may try the same with the nama package as I mentioned earlier.
I just tried that: ~/build/mine/perl-audio-ecasound $ cpan2aur --check . ==> Checking if . is up to date... -> Looking up module for Audio-Ecasound on CPAN... [MSG] No '/home/murks/.cpanplus/custom-sources' dir, skipping custom sources [MSG] No '/home/murks/.cpanplus/custom-sources' dir, skipping custom sources [MSG] No '/home/murks/.cpanplus/custom-sources' dir, skipping custom sources ==> Uploading package directory .... ==> Creating source package for /home/murks/build/mine/perl-audio-ecasound directory... -> Running 'makepkg --source --force --clean'... ==> Created ./perl-audio-ecasound-0.93-1.src.tar.gz source package... ==> Uploading ./perl-audio-ecasound-0.93-1.src.tar.gz to the AUR... Username: hollunder Password: -> Sending package as hollunder... Success. I'm not sure what it did there, whether it updated or not (it did upload something, so I guess it updated?
Sorry for the late response.
Have fun, Justin
Don't worry, I'm late too ;) Thanks for advice. -- Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan
participants (3)
-
Justin Davis
-
Philipp
-
Philipp Überbacher