# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346172910 -7200 # Node ID 3e3f0a094486077c1077f60bc9f788bec734ee4c # Parent 7a661723594660d9a1671c7974d66c8430f96285 Remove seeminlgy mistakenly introduced package which matches upstream version. diff -r 7a6617235946 -r 3e3f0a094486 perl-openpkg/perl-openpkg.pl --- a/perl-openpkg/perl-openpkg.pl Tue Aug 28 18:55:00 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,773 +0,0 @@ -#!@l_prefix@/bin/perl -w -## -## perl-openpkg -- OpenPKG Perl Module Build Utility -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -require 5; -use strict; -use Getopt::Long; -use IO qw(Handle Seekable File Pipe Socket Dir); - -# program information -my $ME = { - prog_path => $0, - prog_name => "perl-openpkg", - prog_vers => "2.0.1", - prog_date => "03-Dec-2004" -}; - -# program configuration -my $CF = { - path_prefix => '@l_prefix@', - path_libdir => "", - path_tmpdir => ($ENV{"TMPDIR"} || "/tmp"), - path_wrkdir => "", - path_buildroot => ($ENV{"RPM_BUILD_ROOT"} || ""), - path_buildwork => ($ENV{"RPM_BUILD_DIR"} || ""), - pkg_name => ($ENV{"RPM_PACKAGE_NAME"} || ""), - perl_schema => "vendor", - perl_args => [], - perl_stdin => "/dev/null", - files_file => "-", - files_unquoted => 0, - prog_rpm => '%path_prefix%/libexec/openpkg/rpm', - prog_perl => '%path_prefix%/bin/perl', - mode_quiet => 0, - mode_verbose => 0, - run_version => 0, - run_help => 0, -}; - -# cleanup support -my @cleanup = (); -sub cleanup_remember { - my ($cmd) = @_; - push(@cleanup, $cmd); -} -sub cleanup_perform { - foreach my $cmd (reverse @cleanup) { - &runcmd($cmd); - } -} - -# exception handling support -$SIG{__DIE__} = sub { - my ($err) = @_; - $err =~ s|\s+at\s+.*||s if (not $CF->{mode_verbose}); - print STDERR "$ME->{prog_name}:ERROR: $err ". ($! ? "($!)" : "") . "\n"; - &cleanup_perform() if (not $CF->{mode_verbose}); - exit(1); -}; - -# verbose message printing -sub verbose { - my ($msg) = @_; - print STDERR "++ $msg\n" if (not $CF->{mode_quiet}); -} - -# expand into a full filesystem path -sub fullpath { - my ($prog) = @_; - my $fullprog = ''; - foreach my $path (split(/:/, $ENV{PATH})) { - if (-x "$path/$prog") { - $fullprog = "$path/$prog"; - last; - } - } - return $fullprog; -} - -# execution of external commands -sub runcmd { - my ($cmd) = @_; - print STDERR "\$ $cmd\n" if ($CF->{mode_verbose}); - $cmd = "($cmd) >/dev/null 2>&1" if ($CF->{mode_quiet}); - return (system($cmd) == 0); -} - -# create a directory (plus its missing parent dirs) -sub mkdirp { - my ($dir) = @_; - my $pdir = $dir; - $pdir =~ s|/[^/]*$||s; - if (not -d $pdir) { - &mkdirp($pdir, 0755); - } - if (not -d $dir) { - &runcmd("umask 022 && mkdir $dir"); - } -} - -# command line parsing -Getopt::Long::Configure("bundling"); -my $result = GetOptions( - 'p|prefix=s' => \$CF->{path_prefix}, - 'l|libdir=s' => \$CF->{path_libdir}, - 't|tmpdir=s' => \$CF->{path_tmpdir}, - 'd|wrkdir=s' => \$CF->{path_wrkdir}, - 'r|buildroot=s' => \$CF->{path_buildroot}, - 'w|buildwork=s' => \$CF->{path_buildwork}, - 'R|rpm=s' => \$CF->{prog_rpm}, - 'P|perl=s' => \$CF->{prog_perl}, - 's|schema=s' => \$CF->{perl_schema}, - 'A|args=s' => \@{$CF->{perl_args}}, - 'I|stdin=s' => \$CF->{perl_stdin}, - 'F|files=s' => \$CF->{files_file}, - 'U|unquoted' => \$CF->{files_unquoted}, - 'n|pkgname=s' => \$CF->{pkg_name}, - 'q|quiet' => \$CF->{mode_quiet}, - 'v|verbose' => \$CF->{mode_verbose}, - 'V|version' => \$CF->{run_version}, - 'h|help' => \$CF->{run_help} -) || die "option parsing failed"; -if ($CF->{run_help}) { - print "Usage: $ME->{prog_name} [options]\n" . - "Available options:\n" . - "\n" . - " -p, --prefix filesystem path to OpenPKG instance\n" . - " -l, --libdir filesystem path to Perl lib directory\n" . - " -t, --tmpdir filesystem path to temporary directory\n" . - " -d, --wrkdir filesystem path to working directory\n" . - " -r, --buildroot filesystem path to RPM build root directory\n" . - " -w, --buildwork filesystem path to RPM build work directory\n" . - " -R, --rpm filesystem path to RPM program\n" . - " -P, --perl filesystem path to Perl program\n" . - "\n" . - " -s, --schema Perl INSTALLDIRS schema\n" . - " -A, --args Perl Build.PL/Makefile.PL passed through arguments\n" . - " -I, --stdin filesystem path to connect to stdin\n" . - " -F, --files filesystem path to write RPM \%files list to\n" . - " -U, --unquoted output RPM \%files list in unquoted format\n" . - " -n, --pkgname name of involved RPM package\n" . - "\n" . - " -q, --quiet operate in quiet run-time mode\n" . - " -v, --verbose operate in verbose run-time mode\n" . - "\n" . - " -V, --version print out program version\n" . - " -h, --help print out program usage help\n"; - exit(0); -} -if ($CF->{run_version}) { - print "OpenPKG $ME->{prog_name} $ME->{prog_vers} ($ME->{prog_date})\n"; - exit(0); -} - -# fix configuration parameters -foreach my $cf (keys(%{$CF})) { - $CF->{$cf} =~ s|\%([A-Za-z_][A-Za-z0-9_]*)\%|$CF->{$1}|sge; -} - -# determine operation steps -my @steps_exist = qw(prepare configure build install fixate cleanup); -my @steps_run = (); -if (@ARGV > 0) { - foreach my $step (@ARGV) { - if (not grep { $_ eq $step } @steps_exist) { - die "operation step \"$step\" not existing"; - } - push(@steps_run, $step); - } - my $steps_exist = "-".join("-", @steps_exist)."-"; - my $steps_run = "-".join("-", @steps_run)."-"; - if ($steps_exist !~ m|^.*${steps_run}.*$|s) { - die "invalid operation step order \"".join(" ", @ARGV)."\""; - } -} -else { - @steps_run = @steps_exist; -} - -# friendly header ;-) -&verbose("OpenPKG $ME->{prog_name} $ME->{prog_vers} ($ME->{prog_date})"); - -# determine RPM program -if (not -x $CF->{prog_rpm}) { - $CF->{prog_rpm} = &fullpath($CF->{prog_rpm}); -} -my $V = `$CF->{prog_rpm} --version 2>/dev/null`; -$V =~ s/^(?:rpm \(OpenPKG RPM\)|RPM version|OpenPKG RPM|rpm\s+\(.+?\))\s+([0-9ab.]+)(\.(?:SNAPSHOT|DEVEL).*)?\s*$/$1/s || - die "program '$CF->{prog_rpm}' seems to be not RPM"; -&verbose("determined RPM program: $CF->{prog_rpm} ($V)"); - -# determine Perl program -if (not -x $CF->{prog_perl}) { - $CF->{prog_perl} = &fullpath($CF->{prog_perl}); -} -$V = `$CF->{prog_perl} --version 2>/dev/null`; -$V =~ s|^.*This is perl.+v?(5\.[\d+.]+).*$|$1|s || - die "program '$CF->{prog_perl}' seems to be not Perl"; -&verbose("determined Perl program: $CF->{prog_perl} ($V)"); - -# check for existing paths -if ($CF->{path_buildroot} eq '') { - die "RPM build root directory not known (specify one with option --buildroot)"; -} -if ($CF->{path_buildwork} eq '') { - die "RPM build work directory not known (specify one with option --buildwork)"; -} -mkdir($CF->{path_buildroot}, 0700); -mkdir($CF->{path_buildwork}, 0700); - -## -## OPERATION SEQUENCE -## - -# establish standard environment -umask(022); - -# determine name of temporary directory -my $tmpdir = $CF->{path_tmpdir}; -$tmpdir =~ s|/+$||s; -my $user = (getlogin() || getpwuid($<) || $ENV{LOGNAME} || $ENV{USERNAME} || "unknown"); -my $program = $ME->{prog_name}; -my $package = ($CF->{pkg_name} || "unknown"); -$tmpdir .= "/$user-$program-$package"; - -# determine name of perl wrapper script -my $perlwrap = "$tmpdir/perl.sh"; - -# optionally change working directory -my $dir = $CF->{path_wrkdir}; -if ($dir ne '') { - if (not -d $dir) { - # be smart and guess correct directory to - # reduce special cases during packaging - $dir =~ s|^.+/||s; - my $parent = ""; - my $child = $dir; - $child =~ s|^(.+/)([^/]+)$|$parent = $1, $2|se; - LOOP: while ($child ne '') { - foreach my $dir (glob("${parent}${child}*")) { - if (-d "$parent$dir") { - $child = $dir; - last LOOP; - } - } - $child =~ s|\W\w+$||s || last; - last if (-d "$parent$child"); - } - $dir = "$parent$child"; - } - chdir($dir) || die "cannot change to working directory \"$dir\""; -} - -# determine Perl configuration -my $pcfg = {}; -my $cmd = "$CF->{prog_perl}" . - " -V:installarchlib -V:installprivlib" . - " -V:installsitearch -V:installsitelib -V:sitelib_stem" . - " -V:installvendorarch -V:installvendorlib -V:vendorlib_stem"; -my $out = `$cmd 2>/dev/null || true`; -$out =~ s|^(\S+)='([^'']*)';$|$pcfg->{$1} = $2, ''|mge; - -# ==== COMPAT prolog/epilog ==== -if (grep { $_ eq "prolog" or $_ eq "epilog" } @steps_run) { - print "This is the perl-openpkg >= 20040126 version.\n" . - "It was redesigned and is incompatible to previous\n" . - "versions. It does not support prolog/epilog steps.\n" . - "Please upgrade the package that uses perl-openpkg\n" . - "or, as a temporary workaround, downgrade perl-openpkg\n"; - die "package/perl-openpkg incompatiblity"; -} - -# ==== STEP: 1. prepare ==== -if (grep { $_ eq "prepare" } @steps_run) { - &verbose("step 1: prepare"); - - # establish temporary directory - system("rm -rf $tmpdir >/dev/null 2>&1"); - mkdir($tmpdir, 0700) || die "cannot create temporary directory '$tmpdir'"; - - # create Perl executable wrapper script - my $io = new IO::File ">$perlwrap" - || die "unable to open \"$perlwrap\" for writing"; - print $io - "#!/bin/sh\n" . - "exec $CF->{prog_perl} \\\n" . - " -I$CF->{path_buildroot}$pcfg->{installarchlib} \\\n" . - " -I$CF->{path_buildroot}$pcfg->{installprivlib} \\\n" . - " -I$CF->{path_buildroot}$pcfg->{installsitearch} \\\n" . - " -I$CF->{path_buildroot}$pcfg->{installsitelib} \\\n" . - " -I$CF->{path_buildroot}$pcfg->{installvendorarch} \\\n" . - " -I$CF->{path_buildroot}$pcfg->{installvendorlib} \\\n" . - " \"\$@\"\n"; - $io->close(); - &runcmd("chmod 755 $perlwrap"); - - # establish Perl module installation areas - &mkdirp("$CF->{path_buildroot}$pcfg->{installarchlib}"); - &mkdirp("$CF->{path_buildroot}$pcfg->{installprivlib}"); - &mkdirp("$CF->{path_buildroot}$pcfg->{installsitearch}"); - &mkdirp("$CF->{path_buildroot}$pcfg->{installsitelib}"); - &mkdirp("$CF->{path_buildroot}$pcfg->{installvendorarch}"); - &mkdirp("$CF->{path_buildroot}$pcfg->{installvendorlib}"); -} - -# ==== STEP: 2. configure ==== -if (grep { $_ eq "configure" } @steps_run) { - &verbose("step 2: configure"); - - # determine build environment and basic arguments - my $environment = ""; - my $perl_args = ''; - if (-f "Build.PL" and (system("$perlwrap -MModule::Build -e '1;' >/dev/null 2>&1") >> 8) == 0) { - # new-style Module::Build "Build.PL" - $perl_args .= " installdirs=$CF->{perl_schema}"; - $perl_args .= " --install_path libdoc=remove-me-later"; - $perl_args .= " destdir=$CF->{path_buildroot}"; - if ($CF->{path_prefix} ne '' and $CF->{path_prefix} ne '@l_prefix@') { - $perl_args .= " install_base=$CF->{path_prefix}"; - } - if ($CF->{path_libdir} ne '') { - $perl_args .= " --install_path lib=$CF->{path_libdir}"; - } - $environment = 'Module::Build'; - } - elsif (-f "Makefile.PL") { # ExtUtils::MakeMaker is part of the Perl distribution - # old-style ExtUtils::MakeMaker "Makefile.PL" - $perl_args .= " PERL=$perlwrap FULLPERL=$perlwrap"; - $perl_args .= " INSTALLDIRS=$CF->{perl_schema}"; - $perl_args .= " INSTALLMAN3DIR=none INSTALLSITEMAN3DIR=none INSTALLVENDORMAN3DIR=none"; - $perl_args .= " DESTDIR=$CF->{path_buildroot}"; - if ($CF->{path_prefix} ne '' and $CF->{path_prefix} ne '@l_prefix@') { - $perl_args .= " PREFIX=$CF->{path_prefix}"; - } - if ($CF->{path_libdir} ne '') { - $perl_args .= " LIB=$CF->{path_libdir}"; - } - $environment = 'ExtUtils::MakeMaker'; - } - else { - die "neither usable Module::Build \"Build.PL\" nor ExtUtils::MakeMaker \"Makefile.PL\" file found"; - } - - # determine build-time extra arguments - # (assuming that they are either work for both Module::Build and - # ExtUtils::MakeMaker or the supplier knows what is used by us) - if ($#{$CF->{perl_args}} >= 0) { - my $user_args = join(" ", @{$CF->{perl_args}}); - if ($user_args =~ m|#|) { - $user_args =~ s|#| $perl_args |; - $perl_args = $user_args; - } - else { - $perl_args .= " " . $user_args; - } - } - - # determine stdin - if ($CF->{perl_stdin} ne "-") { - $perl_args .= " <$CF->{perl_stdin}"; - } - - # setup the build environment - if ($environment eq 'Module::Build') { - &verbose("configuring module via Module::Build environment"); - &runcmd("chmod u+rw Build.PL"); - &runcmd("cp Build.PL Build.PL.orig"); - &runcmd("(cat Build.PL.orig; echo '') | sed -e \"s:\\\$^X:'$perlwrap':g\" >Build.PL"); - &runcmd("$perlwrap ./Build.PL $perl_args") - or die "failed to \"configure\""; - } - elsif ($environment eq 'ExtUtils::MakeMaker') { - &verbose("configuring module via ExtUtils::MakeMaker environment"); - &runcmd("chmod u+rw Makefile.PL"); - &runcmd("cp Makefile.PL Makefile.PL.orig"); - &runcmd("(cat Makefile.PL.orig; echo '') | sed -e \"s:\\\$^X:'$perlwrap':g\" >Makefile.PL"); - &runcmd("$perlwrap ./Makefile.PL $perl_args") - or die "failed to \"configure\""; - } -} - -# ==== STEP: 3. build ==== -if (grep { $_ eq "build" } @steps_run) { - &verbose("step 3: build"); - - if (-f "Build.PL" and -f "Build") { - # execute Build script - &verbose("building module via Module::Build environment"); - &runcmd("$perlwrap Build build") - or die "failed to \"build\""; - } - elsif (-f "Makefile.PL" and -f "Makefile") { - # execute Makefile procedure - &verbose("building module via ExtUtils::MakeMaker environment"); - my $make = `$CF->{prog_rpm} --eval '\%{l_make} \%{l_mflags}'`; - $make =~ s|\n+$||s; - my $make_args = "PERL=$perlwrap FULLPERL=$perlwrap"; - &runcmd("$make $make_args pure_all") - or die "failed to \"build\""; - } - else { - die "neither \"Build\" nor \"Makefile\" found in working directory"; - } -} - -# ==== STEP: 4. install ==== -if (grep { $_ eq "install" } @steps_run) { - &verbose("step 4: install"); - - if (-f "Build.PL" and -f "Build") { - # execute Build script - &verbose("installing module via Module::Build environment"); - &runcmd("$perlwrap Build install") - or die "failed to \"install\""; - &runcmd("rm -rf $CF->{path_buildroot}$CF->{path_prefix}/remove-me-later"); - } - elsif (-f "Makefile.PL" and -f "Makefile") { - # execute Makefile procedure - &verbose("installing module via ExtUtils::MakeMaker environment"); - my $make = `$CF->{prog_rpm} --eval '\%{l_make} \%{l_mflags}'`; - $make =~ s|\n+$||s; - my $make_args = "PERL=$perlwrap FULLPERL=$perlwrap"; - &runcmd("$make $make_args pure_install") - or die "failed to \"install\""; - } - else { - die "neither \"Build\" nor \"Makefile\" found in working directory"; - } -} - -# ==== STEP: 5. fixate ==== -if (grep { $_ eq "fixate" } @steps_run) { - &verbose("step 5: fixate"); - - # prune installation files - my $libdir; - if ($CF->{path_libdir} ne '') { - $libdir = "$CF->{path_buildroot}$CF->{path_libdir}"; - } - else { - $libdir = "$CF->{path_buildroot}$CF->{path_prefix}/lib/perl"; - } - &runcmd("find $libdir -name perllocal.pod -print | xargs rm -f"); - &runcmd("find $libdir -name .packlist -print | xargs rm -f"); - &runcmd("find $libdir -depth -type d -print | (xargs rmdir >/dev/null 2>&1 || true)"); - - # determine RPM installation file list - my @files = (); - if ($CF->{path_libdir} eq '') { - push(@files, '%not %dir '.$CF->{path_prefix}.'/lib/perl'); - push(@files, '%not %dir '.$pcfg->{installarchlib}.'/auto'); - push(@files, '%not %dir '.$pcfg->{installarchlib}); - push(@files, '%not %dir '.$pcfg->{installprivlib}.'/auto'); - push(@files, '%not %dir '.$pcfg->{installprivlib}); - push(@files, '%not %dir '.$pcfg->{sitelib_stem}); - push(@files, '%not %dir '.$pcfg->{installsitearch}.'/auto'); - push(@files, '%not %dir '.$pcfg->{installsitearch}); - push(@files, '%not %dir '.$pcfg->{installsitelib}.'/auto'); - push(@files, '%not %dir '.$pcfg->{installsitelib}); - push(@files, '%not %dir '.$pcfg->{vendorlib_stem}); - push(@files, '%not %dir '.$pcfg->{installvendorarch}.'/auto'); - push(@files, '%not %dir '.$pcfg->{installvendorarch}); - push(@files, '%not %dir '.$pcfg->{installvendorlib}.'/auto'); - push(@files, '%not %dir '.$pcfg->{installvendorlib}); - } - else { - push(@files, $CF->{path_libdir}); - } - - # output RPM installation file list - my $out; - if ($CF->{files_file} eq "-") { - $out = new IO::Handle; - $out->fdopen(fileno(STDOUT), "w"); - } - else { - $out = new IO::File ">$CF->{files_file}"; - } - if ($CF->{files_unquoted}) { - print $out join("\n", @files) . "\n"; - } - else { - print $out '"'. join('"'."\n".'"', @files).'"'."\n"; - } - $out->close(); -} - -# ==== STEP: 6. cleanup ==== -if (grep { $_ eq "cleanup" } @steps_run) { - &verbose("step 6: cleanup"); - - # remove temporary directory and its contents - &runcmd("rm -rf $tmpdir"); -} - -# die gracefully... -&verbose("cleaning up environment"); -&cleanup_perform(); -exit(0); - -__END__ - -## -## UNIX MANUAL PAGE -## - -=pod - -=head1 NAME - -B - B - -=head1 SYNOPSIS - -B -[B<-p>|B<--prefix> I] -[B<-D>|B<--libdir> I] -[B<-t>|B<--tmpdir> I] -[B<-d>|B<--wrkdir> I] -[B<-r>|B<--buildroot> I] -[B<-w>|B<--buildwork> I] -[B<-R>|B<--rpm> I] -[B<-P>|B<--perl> I] -[B<-s>|B<--schema> I -[B<-A>|B<--args> I] -[B<-I>|B<--stdin> I] -[B<-F>|B<--files> I] -[B<-U>|B<--unquoted>] -[B<-n>|B<--pkgname> I] -[B<-q>|B<--quiet>] -[B<-v>|B<--verbose>] -[I ...] - -B -[B<-v>|B<--version>] -[B<-h>|B<--help>] - -=head1 DESCRIPTION - -The B program is an internal B packaging utility -for building C based Perl modules during the build -procedure of Perl module based B packages. It provides an -adjustable C environment. - -=head1 OPTIONS - -The following command line options are available: - -=head2 Filesystem Paths - -The following command-line options set various filesystem paths. - -=over 4 - -=item B<-p>, B<--prefix> I - -Filesystem path to OpenPKG instance. Default is C<@l_prefix@>. - -=item B<-l>, B<--libdir> I - -Filesystem path to Perl lib directory. Default is -"IC". - -=item B<-t>, B<--tmpdir> I - -Filesystem path to temporary directory. Default is C<$TMPDIR>, -as provided by the RPM build-time environment. - -=item B<-d>, B<--wrkdir> I - -Filesystem path to working directory. Default is current working directory -as provided by the RPM build-time environment. - -=item B<-r>, B<--buildroot> I - -Filesystem path to RPM build root directory. Default is C<$RPM_BUILD_ROOT>, -as provided by the RPM build-time environment. - -=item B<-w>, B<--buildwork> I - -Filesystem path to RPM build work directory. Default is C<$RPM_BUILD_DIR>, -as provided by the RPM build-time environment. - -=item B<-R>, B<--rpm> I - -Filesystem path to RPM program. Default is "IC". - -=item B<-P>, B<--perl> I - -Filesystem path to Perl program. Default is IC. - -=back - -=head2 OpenPKG Package Information - -The following command-line options set various package information. - -=over 4 - -=item B<-s>, B<--schema> I - -Sets the Perl C schema. Allowed values are -"C", "C" and "C". The default is "C". - -=item B<-A>, B<--args> I - -Sets additional arguments which are passed through on the "C" command line. This option can be specified multiple times, -args are joined with a space between them. If joined args contain a '#' then -it is substituted by the automatically generated args otherwise joined args -are appended to automatically generated args. Default is empty. - -=item B<-I>, B<--stdin> I - -Filesystem path to connect to F on the "C" -command line. Default is "C". A value of "C<->" means reading -from F. - -=item B<-F>, B<--files> I - -Filesystem path to write the RPM C<%files> entries to describing the -packaging list of all installed files. The default is "C<->" meaning -that the list is written to F. - -=item B<-U>, B<--unquoted> - -By default the RPM <%files> list is written with each path entry -enclosed in quotation marks. For raw post-processing, this option allows -the list to be written without enclosing quotation marks. - -=item B<-n>, B<--pkgname> I - -Name of involved RPM package. - -=back - -=head2 Run-Time Modes - -The following command-line options set various run-time modes. - -=over 4 - -=item B<-q>, B<--quiet> - -Operate in quiet run-time mode. - -=item B<-v>, B<--verbose> - -Operate in verbose run-time mode. - -=back - -=head2 Stand-Alone Operations - -The following command-line options trigger various stand-alone operations. - -=over 4 - -=item B<-V>, B<--version> - -Print program version only. - -=item B<-h>, B<--help> - -Print program usage help only. - -=back - -=head1 OPERATION STEPS - -The operation procedure of B is divided into the following -six distinguished steps: - -=over 3 - -=item B<1. prepare> - -This prepares the build environment by optionally creating a temporary -directory and establishing a Perl wrapper script. -This step can be shared between the configuration, building and installation -of multiple modules. - -=item B<2. configure> - -This configures the Perl module by performing the equivalent of -the command "C". This step has to be performed -individually for each particular module. - -=item B<3. build> - -This builds the Perl module by performing the equivalent of the command -"C". This step has to be performed individually for each -particular module. - -=item B<4. install> - -This installs the Perl module by performing the equivalent of the -command "C". This step has to be performed individually -for each particular module. - -=item B<5. fixate> - -This fixates the installed files by removing unnecessary ones, fixing -permissions and determining the resulting file list. This step can be -shared between the configuration, building and installation of multiple -modules. - -=item B<6. cleanup> - -This cleans up the build environment by removing all temporary files. -This step can be shared between the configuration, building and -installation of multiple modules. - -=back - -By default all operation steps are performed in sequence. Alternatively, -the sequence of steps can be individually specified on the command -line as one or more I arguments. The given sequence of Is -has to be exactly a contiguous sub-sequence of the sequence listed -above. As the extrem cases, it can be "C" (the same as not specifying any steps) or just perhaps -"C" (for executing only a particular step). - -=head1 EXAMPLE - - # packaging of single module - perl-openpkg - - # packaging of multiple modules - perl-openpkg prepare - perl-openpkg -d Foo-1 configure build install - perl-openpkg -d Bar-2 configure build install - perl-openpkg -d Baz-3 configure build install - perl-openpkg fixate cleanup - -=head1 HISTORY - -The B utility was originally implemented as a small -Bourne-Shell script for use in OpenPKG 1.1. It was later rewritten from -scratch in Perl for OpenPKG 2.0 and especially made more flexible to -reduce the complexity in numerious packages. - -=head1 SEE ALSO - -perl(1), "C". - -=head1 AUTHORS - -Ralf S. Engelschall Erse@engelschall.comE. - -=cut - diff -r 7a6617235946 -r 3e3f0a094486 perl-openpkg/perl-openpkg.spec --- a/perl-openpkg/perl-openpkg.spec Tue Aug 28 18:55:00 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -## -## perl-openpkg.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2010 OpenPKG Foundation e.V. -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -# package version -%define V_perl 5.14.1 - -# package information -Name: perl-openpkg -Summary: OpenPKG Perl Module Build Utility -URL: - -Vendor: The OpenPKG Project -Packager: OpenPKG Foundation e.V. -Distribution: OpenPKG Community -Class: BASE -Group: Perl -License: PD -Version: %{V_perl} -Release: 20110914 - -# list of sources -Source0: perl-openpkg.pl - -# build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, perl >= %{V_perl} -PreReq: OpenPKG, openpkg >= 20060823, perl >= %{V_perl} -PreReq: gcc -AutoReq: no -AutoReqProv: no - -%description - perl-openpkg is a small OpenPKG-specific packaging utility which - simplifies the build procedures in the various OpenPKG packages - which include Perl modules. It is intended for internal use by those - OpenPKG packages only. - -%track - prog perl-openpkg = { - disabled - comment = "rse: no vendor tarball possible, because we are the vendor ;-)" - version = 0 - url = http://cvs.openpkg.org/openpkg-src/ - regex = perl-openpkg.sh - } - -%prep - %setup -T -c - cp %{SOURCE perl-openpkg.pl} . - -%build - %{l_prefix}/bin/pod2man \ - --quotes=none \ - --section=1 --center='OpenPKG Perl Module Build Utility' \ - --release="%{release}" --date='%{l_openpkg_release}' \ - perl-openpkg.pl >perl-openpkg.1 - -%install - rm -rf $RPM_BUILD_ROOT - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/bin \ - $RPM_BUILD_ROOT%{l_prefix}/man/man1 - %{l_shtool} install -c -m 755 %{l_value -s -a} \ - perl-openpkg.pl \ - $RPM_BUILD_ROOT%{l_prefix}/bin/perl-openpkg - %{l_shtool} install -c -m 644 \ - perl-openpkg.1 \ - $RPM_BUILD_ROOT%{l_prefix}/man/man1/ - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} - -%files -f files - -%clean - rm -rf $RPM_BUILD_ROOT -