[arch-projects] [abs] [PATCH] PKGBUILD-perl.proto: Download sources by module instead of by author
From: "Jason St. John" <jstjohn@purdue.edu> CPAN apparently changed the by-authors download URL structures because http://cpan.perl.org/modules/by-authors/id/$_author/ does not work anymore. The directory structure appears to be 'by-authors/id/<first letter>/<first two letters>/$_author', which significantly reduces the usefulness of _author in the default PKGBUILD. I changed the source array to download by module instead of by author to make things simple. The _author variable is no longer needed, and I added a _modnamespace variable to handle CPAN's URL format. Signed-off-by: Jason St. John <jstjohn@purdue.edu> --- prototypes/PKGBUILD-perl.proto | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/prototypes/PKGBUILD-perl.proto b/prototypes/PKGBUILD-perl.proto index c4260fb..fb90023 100644 --- a/prototypes/PKGBUILD-perl.proto +++ b/prototypes/PKGBUILD-perl.proto @@ -8,16 +8,20 @@ # # In most cases, 'arch' should be 'any' because most Perl packages are # architecture independent. +# +# _modnamespace is for the module's namespace. For example, use "Text" if the +# module name is Text::CSV::Unicode. +# # Maintainer: Your Name <youremail@domain.com> -_author=AUTHOR_NAME _perlmod=MODNAME +_modnamespace=MODULE-NAMESPACE pkgname=perl-$_perlmod pkgver=VERSION pkgrel=1 pkgdesc="" arch=('any') -url="http://search.cpan.org/~$_author/$_perlmod-$pkgver/" +url="http://search.cpan.org/dist/$_perlmod" license=('GPL' 'PerlArtistic') groups=() depends=('perl>=5.10.0') @@ -28,7 +32,7 @@ replaces=() backup=() options=('!emptydirs') install= -source=("http://cpan.perl.org/modules/by-authors/id/$_author/$_perlmod-$pkgver.tar.gz") +source=("http://cpan.perl.org/modules/by-module/$_modnamespace/$_perlmod-$pkgver.tar....") md5sums=() build() { -- 1.7.11.4
participants (1)
-
jstjohn@purdue.edu