aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
Diffstat (limited to 'Perl')
-rwxr-xr-xPerl/export2cpan27
1 files changed, 15 insertions, 12 deletions
diff --git a/Perl/export2cpan b/Perl/export2cpan
index d57c002..80e58b4 100755
--- a/Perl/export2cpan
+++ b/Perl/export2cpan
@@ -15,12 +15,13 @@
# The source files are taken from the working directory. This is
# the anticipated behavior when developping/testing or making
# a debian package from the rules file.
+# $Id$
use strict;
my $ZINC_PREFIX = 'tk-zinc';
my $DEFAULT_SERVER = 'liszt.pii.ath.cena.fr';
-my $TMP = '/tmp';
+my $TMP = '/tmp/forCPAN';
sub version4cpan {
my $configure_in = "../configure.in";
@@ -92,15 +93,16 @@ if ($FROM_CVS) {
}
$VERSION = version4cpan; # version computed from the source directory
$DIR_FROM_CVS = "$ZINC_PREFIX-$VERSION";
- system("rm -rf $TMP/$DIR_FROM_CVS");
- chdir($TMP);
- print "cvs -d :ext:$server:/pii/repository export -r $cvstag -d $DIR_FROM_CVS Tkzinc\n";
- my $error = system("cvs -d :ext:$server:/pii/repository export -r $cvstag -d $DIR_FROM_CVS Tkzinc");
+ system("rm -rf $TMP");
+ system ("mkdir $TMP");
+ chdir("$TMP");
+ print "cd $TMP; cvs -d :ext:$server:/pii/repository export -r $cvstag -d $DIR_FROM_CVS Tkzinc\n";
+ my $error = system("cd $TMP; cvs -d :ext:$server:/pii/repository export -r $cvstag -d $DIR_FROM_CVS Tkzinc");
die "CVS extraction did not succeed" if $error;
- chdir($DIR_FROM_CVS);
+ chdir("$DIR_FROM_CVS/Perl");
my $EXTRACTED_VERSION = version4cpan; # version gotten from the tagged CVS files
- if ($EXTRACTED_VERSION ne $tag_version) {
- print "Oops! the tag version does not match the version in the sources, aborting\n";
+ if ($EXTRACTED_VERSION ne $VERSION) {
+ print "Oops! the tag version '$tag_version' does not match the version '$VERSION' in the sources, aborting\n";
exit(1);
}
}
@@ -119,7 +121,7 @@ if (-d "$EXPORT_DIR/$VERSION_DIR") {
system("rm -rf $EXPORT_DIR/$VERSION_DIR");
}
mkdir("$EXPORT_DIR/$VERSION_DIR");
-system("ln -s $EXPORT_DIR/$VERSION_DIR $EXPORT_DIR/$ZINC_PREFIX");
+symlink ("$EXPORT_DIR/$VERSION_DIR", "$EXPORT_DIR/$ZINC_PREFIX");
my @files=('t', 'Zinc.xs', 'trace', 'demos', 'README', 'Zinc', 'ZincTrace');
foreach my $f (@files) {
@@ -134,6 +136,7 @@ system("cp ../generic/*.c $EXPORT_DIR/$VERSION_DIR");
system("cp ../generic/*.h $EXPORT_DIR/$VERSION_DIR");
system("cp ../win/*.c $EXPORT_DIR/$VERSION_DIR");
system("cp ../debian/changelog $EXPORT_DIR/$VERSION_DIR/Changes");
+system("cp ../debian/copyright $EXPORT_DIR/$VERSION_DIR/COPYRIGHT");
#
# If working for an exported copy, build a tarball in the
@@ -154,8 +157,8 @@ if ($FROM_CVS) {
chdir('..');
- system("tar zcf $CWD/$ZINC_PREFIX-$VERSION.tar.gz $VERSION_DIR");
+ system("tar zcf $TMP/$ZINC_PREFIX-$VERSION.tar.gz $VERSION_DIR");
chdir($CWD);
- print "The tarball is in $CWD/$ZINC_PREFIX-$VERSION.\n";
- print "You may want to clean up after testing in $TMP$DIR_FROM_CVS\n";
+ print "The tarball is in $TMP/$ZINC_PREFIX-$VERSION.tar.gz\n";
+ print "You may want to clean up after testing in $TMP/$DIR_FROM_CVS\n";
}