aboutsummaryrefslogtreecommitdiff
path: root/Perl/CPANising-tkzinc.pl
blob: b340b143407561226fe3c53c6da1bbcdd9e2c438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/perl

# this script build the tk-zinc-n.mmm.tar.gz file which must then
# be uploaded on the CPAN on ZINCDEV account


# this version must be the same than those in the CVS repository
# in CVS the tag has the following form: cpan_n_mmm
my $version = 3.294;

chdir ('/tmp');

my $cvstag = 'cpan_' . $version;
$cvstag =~ s/\./_/ ;


my $dirname = "tk-zinc-$version";

system ("rm -rf $dirname");

my $command = "cvs -d :ext:liszt.pii.ath.cena.fr:/pii/repository export -r $cvstag -d $dirname Tkzinc";
print "cvs: $command\n";
system ($command) ;

chdir ("/tmp/$dirname");

use ExtUtils::MakeMaker;

my $ver =  MM->parse_version("Perl/Zinc.pm");
die "version in $0 and Zinc.pm must be identical" unless $ver == $version ;

## the debian changelog is copied and renamed in the root directory
system ('cp -p debian/changelog Changes');

## the CPANising-tkzinc.pl script is not supposed to be distributed
system ('rm -rf sandbox debian CPANising-tkzinc.pl');

# removing the .cvsignore files
system ('find . -name .cvsignore | xargs rm -f');

# creating the MANIFEST file
use ExtUtils::Manifest qw( mkmanifest );
&mkmanifest();

# and finally creating the tar file, ready to upload
chdir ("/tmp");
system ("tar cfz $dirname.tar.gz $dirname");