summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2004-11-17 15:05:19 +0000
committerJason Woodward2004-11-17 15:05:19 +0000
commitcbe971349e8d5dcb49ccd73ed16c222cc230a558 (patch)
tree70659d2f9cafcb7d4a6bf560f5b7049ff3fadc83
parent405c6b4c4ad41917fc4695b9683563664343064d (diff)
downloadcpan2tgz-cbe971349e8d5dcb49ccd73ed16c222cc230a558.tar.gz
generate the doinst.sh to fix perllocal.pod by concatenating it's contents from doinst.sh and removing it from the build directory before the pkg is made
-rw-r--r--Changelog6
-rwxr-xr-xcpan2tgz41
2 files changed, 33 insertions, 14 deletions
diff --git a/Changelog b/Changelog
index c3bc1e3..8decc7c 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,9 @@
-0.2 Nov 16, 2004
+0.2 Nov 17, 2004
+ * generate the doinst.sh to fix perllocal.pod by concatenating it's contents
+ from doinst.sh and removing it from the build directory before the pkg is made
+ * fixed dependency names for Perl modules to follow perl-${module/::/-}
+ * always list perl as a dependency in generated package
* formatting updates of system() calls
0.1 Nov 16, 2004
diff --git a/cpan2tgz b/cpan2tgz
index 7b8e4f7..9584a70 100755
--- a/cpan2tgz
+++ b/cpan2tgz
@@ -140,26 +140,41 @@ sub do_package {
print $script_fh "chmod 644 ./usr/man/man?/*\n" if( -d "$dest_dir/usr/man" );
print $script_fh "rmdir ./usr/share\n" if( -d "$dest_dir/usr/share" );
print $script_fh "mkdir ./install\n";
+ # generate the doinst.sh to fix perllocal.pod
+ print $script_fh <<SCRIPT
+PERLLOCALPOD=\`find . -name perllocal.pod\`
+cat >./install/doinst.sh <<EOF
+#!/bin/sh
+
+cat >> \${PERLLOCALPOD/.\\//} <<PLP
+
+EOF
+cat \$PERLLOCALPOD >>install/doinst.sh
+echo "PLP" >>install/doinst.sh
+rm \$PERLLOCALPOD
+SCRIPT
+;
+
close($script_fh);
system("cd $dest_dir && sh build.sh");
system("cd $dest_dir && rm build.sh");
+
# generate the slack-required file
- if( scalar(keys %{$pack->prereq_pm()}) > 0 ){
- open(my $required_fh,">$dest_dir/install/slack-required") or die "Failed to open slack-required for writing: $!";
- # use the hashref here so we can get the version
- my $deps = $pack->prereq_pm();
- foreach my $perl_mod_dep ( keys %{$deps} ){
- my $version = $deps->{$perl_mod_dep};
- (my $pmd = $perl_mod_dep) =~ s/\:\:/\-/g;
- if( int($version) > 0 ){
- print $required_fh "$pmd >= $version\n";
- }else{
- print $required_fh "$pmd\n";
- }
+ open(my $required_fh,">$dest_dir/install/slack-required") or die "Failed to open slack-required for writing: $!";
+ print $required_fh "perl\n";
+ # use the hashref here so we can get the version
+ my $deps = $pack->prereq_pm();
+ foreach my $perl_mod_dep ( keys %{$deps} ){
+ my $version = $deps->{$perl_mod_dep};
+ (my $pmd = $perl_mod_dep) =~ s/\:\:/\-/g;
+ if( int($version) > 0 ){
+ print $required_fh "perl-$pmd >= $version\n";
+ }else{
+ print $required_fh "perl-$pmd\n";
}
- close($required_fh);
}
+ close($required_fh);
# generate the slack-desc file
open(my $desc_fh,">$dest_dir/install/slack-desc") or die "Failed to open slack-desc for writing: $!";