summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2006-05-27 19:31:54 +0000
committerJason Woodward2006-05-27 19:31:54 +0000
commitb99b85c56f3e2678b36e5bbb54bc09e51d5cb246 (patch)
treee3366cfebd8efee4d33d6967936bd26ef1868524
parent98bd7664a15f83dc6b21e0bb0bbd330bb43c7c62 (diff)
downloadcpan2tgz-b99b85c56f3e2678b36e5bbb54bc09e51d5cb246.tar.gz
added --build-number option (see docs)
-rw-r--r--Changelog1
-rw-r--r--README7
-rwxr-xr-xcpan2tgz18
3 files changed, 19 insertions, 7 deletions
diff --git a/Changelog b/Changelog
index 2fab904..218e220 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,6 @@
0.5.2 May 27, 2006
+ * added --build-number option (see docs)
* fixed architecture detection by examining unpacked module source
directory.
* added --build-tag option (see docs)
diff --git a/README b/README
index a9bcf9a..a7f0d4b 100644
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ NAME
SYNOPSIS
cpan2tgz [option(s)] [module(s)]
- options: [--no-recursive] [--ignoreinstalled] [--no-install] [--pkgdir] [--build-tag]
+ options: [--no-recursive] [--ignoreinstalled] [--no-install] [--pkgdir] [--build-tag] [--build-number]
cpan2tgz --upgrade-all
@@ -32,7 +32,7 @@ OPTIONS
This option specifies the final location to place the generated
package(s). Defaults to /usr/src.
- module((s))
+ module(s)
A series of Perl modules to install, ie Data::Dumper
--upgrade-all
@@ -42,6 +42,9 @@ OPTIONS
--build-tag
Set the package's build tag, foo-0.1-arch-1buildtag.tgz.
+ --build-number
+ Set the package's build number, foo-0.1-arch-build_number.tgz.
+
NOTES
cpan2tgz uses the CPAN Perl module. A working CPAN/Config.pm is
assumed. If CPAN has not been initialized prior to running cpan2tgz,
diff --git a/cpan2tgz b/cpan2tgz
index f215106..9b05222 100755
--- a/cpan2tgz
+++ b/cpan2tgz
@@ -35,10 +35,11 @@ my (
$no_install_after_building, $ignore_installed_deps,
$tmp_dir, $package_dir,
$nobanner, $upgrade_all,
- $build_tag
+ $build_tag, $build_number
);
-$tmp_dir = "/tmp/";
-$package_dir = "/usr/src/";
+$tmp_dir = "/tmp/";
+$package_dir = "/usr/src/";
+$build_number = 1;
usage() unless
GetOptions(
@@ -49,6 +50,7 @@ usage() unless
"nobanner" => \$nobanner,
"upgrade-all" => \$upgrade_all,
"build-tag=s" => \$build_tag,
+ "build-number=i" => \$build_number,
);
$build_tag ||= q[];
@@ -112,7 +114,7 @@ sub do_package
} else {
$pkg_name .= "-noarch";
}
- $pkg_name .= "-1$build_tag.tgz";
+ $pkg_name .= "-${build_number}${build_tag}.tgz";
my $dest_dir = $tmp_dir . '/' . $module->id();
@@ -309,6 +311,8 @@ sub usage
print " --pkgdir location to place the generated package(s)\n";
print " --nobanner Leave out the cpan2tgz banner in the description\n";
print " --upgrade-all Create packages (and install) for all outdated modules\n";
+ print " --build-tag Specifies the package build tag\n";
+ print " --build-number Specifies the package build number\n";
exit(1);
}
@@ -333,7 +337,7 @@ cpan2tgz - create Slackware GNU/Linux packages from CPAN Perl module distributio
cpan2tgz [option(s)] [module(s)]
-options: [--no-recursive] [--ignoreinstalled] [--no-install] [--pkgdir] [--build-tag]
+options: [--no-recursive] [--ignoreinstalled] [--no-install] [--pkgdir] [--build-tag] [--build-number]
cpan2tgz --upgrade-all
@@ -373,6 +377,10 @@ Create packages and install for all outdated modules on the system. Do not pass
Set the package's build tag, foo-0.1-arch-1buildtag.tgz.
+=item B<--build-number>
+
+Set the package's build number, foo-0.1-arch-build_number.tgz.
+
=head1 NOTES
cpan2tgz uses the CPAN Perl module. A working CPAN/Config.pm is assumed. If CPAN has not been initialized prior to running cpan2tgz, it will be initialized on the first run.