Permalink
Browse files

fix META.* urls

  • Loading branch information...
1 parent df79aa8 commit b0d95cc3855a7847ba50c151e89f7aba1a1266ea Christoph Maser committed with zyv Feb 7, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 perl-stuff/mcsfb.pl
View
@@ -20,11 +20,12 @@
my $module = $cb->parse_module( module => $name ) or die "Cannot make a module object out of $name\n";
my $package_name = $module->package_name();
+#print Dumper($package_name);
if ( lc($name) ne lc($package_name)) { die "Given Name does not match package name\nSeareched for $name but found $package_name\n"; };
-my $json_url = "http://search.cpan.org/src/" . $module->author->cpanid . "/" . $name . "-" . $module->package_version . "/META.json";
-my $yaml_url = "http://search.cpan.org/src/" . $module->author->cpanid . "/" . $name . "-" . $module->package_version . "/META.yml";
+my $json_url = "http://search.cpan.org/src/" . $module->author->cpanid . "/" . $package_name . "-" . $module->package_version . "/META.json";
+my $yaml_url = "http://search.cpan.org/src/" . $module->author->cpanid . "/" . $package_name . "-" . $module->package_version . "/META.yml";
my $yaml_file;
my $meta;
if ( $yaml_file = get($json_url) ) {
@@ -53,7 +54,7 @@
print "Group: Applications/CPAN\n";
print "URL: http://search.cpan.org/dist/$name/\n";
print "\n";
-print "Source: http://search.cpan.org/CPAN/" . $module->path . "/" . $name . "-%{version}.tar.gz\n";
+print "Source: http://search.cpan.org/CPAN/" . $module->path . "/" . $package_name . "-%{version}.tar.gz\n";
print "BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root\n";
print "BuildArch: noarch\n";
print "\n";

0 comments on commit b0d95cc

Please sign in to comment.