Browse Source

some cleanups

master
parent
commit
309bf1e872
  1. 26
      perl-openpkg/perl-openpkg.pl
  2. 7
      perl-openpkg/perl-openpkg.spec

26
perl-openpkg/perl-openpkg.pl

@ -1,9 +1,9 @@
#!@l_prefix@/bin/perl -w
##
## perl-openpkg -- OpenPKG Perl Module Build Utility
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
@ -33,8 +33,8 @@ use IO qw(Handle Seekable File Pipe Socket Dir);
my $ME = {
prog_path => $0,
prog_name => "perl-openpkg",
prog_vers => "1.1.0",
prog_date => "01-Dec-2003"
prog_vers => "2.0.0",
prog_date => "26-Jan-2004"
};
# program configuration
@ -70,7 +70,7 @@ sub cleanup_perform {
}
}
# exception handling support
# exception handling support
$SIG{__DIE__} = sub {
my ($err) = @_;
$err =~ s|\s+at\s+.*||s if (not $CF->{mode_verbose});
@ -203,7 +203,7 @@ else {
if (not -x $CF->{prog_rpm}) {
$CF->{prog_rpm} = &fullpath($CF->{prog_rpm});
}
my $V = `$CF->{prog_rpm} --version 2>/dev/null`;
my $V = `$CF->{prog_rpm} --version 2>/dev/null`;
$V =~ s/^(RPM version|OpenPKG RPM)\s+([0-9.]+)\s*$/$2/s ||
die "program '$CF->{prog_rpm}' seems to be not RPM";
&verbose("determined RPM program: $CF->{prog_rpm} ($V)");
@ -212,7 +212,7 @@ $V =~ s/^(RPM version|OpenPKG RPM)\s+([0-9.]+)\s*$/$2/s ||
if (not -x $CF->{prog_perl}) {
$CF->{prog_perl} = &fullpath($CF->{prog_perl});
}
$V = `$CF->{prog_perl} --version 2>/dev/null`;
$V = `$CF->{prog_perl} --version 2>/dev/null`;
$V =~ s|^.*This is perl, v?([\d+.]+) .*$|$1|s ||
die "program '$CF->{prog_perl}' seems to be not Perl";
&verbose("determined Perl program: $CF->{prog_perl} ($V)");
@ -292,7 +292,7 @@ if (grep { $_ eq "prolog" or $_ eq "epilog" } @steps_run) {
# ==== 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'";
@ -415,7 +415,7 @@ if (grep { $_ eq "fixate" } @steps_run) {
&runcmd("find $libdir -name perllocal.pod -print | xargs rm -f");
&runcmd("find $libdir -name .packlist -print | xargs rm -f");
&runcmd("find $libdir -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)");
# determine RPM installation file list
my $files = '';
$files .= '"%not %dir '.$CF->{path_prefix}.'"'."\n";
@ -474,7 +474,7 @@ B<perl-openpkg> - B<OpenPKG Perl Module Build Utility>
=head1 SYNOPSIS
B<perl-openpkg>
B<perl-openpkg>
[B<-p>|B<--prefix> I<dir-path>]
[B<-D>|B<--libdir> I<dir-path>]
[B<-t>|B<--tmpdir> I<dir-path>]
@ -492,7 +492,7 @@ B<perl-openpkg>
[B<-v>|B<--verbose>]
[I<step> ...]
B<perl-openpkg>
B<perl-openpkg>
[B<-v>|B<--version>]
[B<-h>|B<--help>]
@ -624,7 +624,7 @@ Print program usage help only.
=head1 OPERATION STEPS
The operation procedure of B<perl-openpkg> is divided into the following
six distinguished steps:
six distinguished steps:
=over 3

7
perl-openpkg/perl-openpkg.spec

@ -48,8 +48,9 @@ AutoReqProv: no
%description
perl-openpkg is a small OpenPKG-specific packaging utility which
simplifies the build procedures in the various OpenPKG perl-xxx
packages. It is intended for internal use by OpenPKG packages only.
simplifies the build procedures in the various OpenPKG packages
which include Perl modules. It is intended for internal use by those
OpenPKG packages only.
%prep
%setup -T -c
@ -59,7 +60,7 @@ AutoReqProv: no
%{l_prefix}/bin/pod2man \
--quotes=none \
--section=1 --center='OpenPKG Perl Module Build Utility' \
--release="`date '+%Y-%m-%d'`" --date='%{l_openpkg_release}' \
--release="%{release}" --date='%{l_openpkg_release}' \
perl-openpkg.pl >perl-openpkg.1
%install

Loading…
Cancel
Save