2 #############################################################################
3 ## Name: script/make_ppm.pl
4 ## Purpose: builds the Wx and Wx-dev PPMs
5 ## Author: Mattia Barbon
8 ## RCS-ID: $Id: make_ppm.pl 2089 2007-07-21 12:10:50Z mbarbon $
9 ## Copyright: (c) 2003, 2006-2007 Mattia Barbon
10 ## Licence: This program is free software; you can redistribute it and/or
11 ## modify it under the same terms as Perl itself
12 #############################################################################
16 use Archive::Tar 0.23;
20 find( { wanted => \&wanted,
28 push @files, $File::Find::name;
34 if( m[\.(?:lib|a|h)$]i
43 my $auth = 'Mattia Barbon <mbarbon@cpan.org>';
44 my $wx_ver = Module::Info->new_from_file( 'Wx.pm' )->version;
47 ( { files => [ @bin ],
50 abstract => 'perl interface to the wxWigdets GUI library',
56 abstract => 'developement files for wxPerl',
61 foreach my $ppm ( @ppms ) {
67 my $tar = Archive::Tar->new;
68 my $pack_ver = join ",", (split (/\./, $data{version}), (0) x 4) [0 .. 3];
69 my $author = $data{author}; $author =~ s/</</g; $author =~ s/>/>/g;
70 my $arch = $Config{archname} . ( $] >= 5.008 ? '-5.8' : '' );
71 my $base = $data{package} . '-' . $data{version};
72 my $tarfile = "$base-ppm.tar.gz";
73 my $ppdfile = "$base.ppd";
75 <SOFTPKG NAME="$data{package}" VERSION="$pack_ver">
76 <TITLE>$data{package}</TITLE>
77 <ABSTRACT>$data{abstract}</ABSTRACT>
78 <AUTHOR>$author</AUTHOR>
81 <ARCHITECTURE NAME="$arch" />
82 <CODEBASE HREF="$tarfile" />
87 $tar->add_files( @{$data{files}} );
88 $tar->write( $tarfile, 9 );
91 open PPD, "> $ppdfile" or die "open '$ppdfile': $!";