#
# - CGI::Persistent -
# This spec file was automatically generated by cpan2rpm [ver: 2.026]
# The following arguments were used:
# --release=1centos CGI::Persistent
# For more information on cpan2rpm please visit: http://perl.arix.com/
#
%define pkgname CGI-Persistent
%define filelist %{pkgname}-%{version}-filelist
%define NVR %{pkgname}-%{version}-%{release}
%define maketest 1
name: perl-CGI-Persistent
summary: CGI-Persistent - - Transparent state persistence for CGI applications.
version: 0.22
release: 8%{?dist}
license: Artistic
group: Applications/CPAN
url: http://www.cpan.org
buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
buildarch: noarch
prefix: %(echo %{_prefix})
source: http://search.cpan.org/dist/V/VI/VIPUL/CGI-Persistent-0.22.tar.gz
Patch0: perl-CGI-Persistent-0.22-patch.2002051500
Patch1: perl-CGI-Persistent-0.22.patch.2002081600
Patch2: perl-CGI-Persistent-0.22.patch.2002090400
Patch3: perl-CGI-Persistent-0.22.patch.2004111101
Patch4: perl-CGI-Persistent-0.22-patch.stringify
Patch5: perl-CGI-Persistent-0.22-fileparse.patch
Requires: perl
BuildRequires: perl(Persistence::Object::Simple)
%description
This is a perl module, autogenerated by cpan2rpm. The original package's
description was:
Transparent State Persistence in CGI scripts
use CGI::Persistent;
my $cgi = new CGI::Persistent "/directory";
print $cgi->header ();
my $url = $cgi->state_url ();
print "I am a persistent CGI session.";
%prep
%setup -q -n CGI-Persistent-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0
%patch4 -p1
%patch5 -p1
%build
grep -rsl '^#!.*perl' . |
grep -v '.bak$' |xargs --no-run-if-empty \
%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
CFLAGS="$RPM_OPT_FLAGS"
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
%{__make}
%if %maketest
%{__make} test
%endif
%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
# SuSE Linux
if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
then
%{__mkdir_p} %{buildroot}/var/adm/perl-modules
%{__cat} `find %{buildroot} -name "perllocal.pod"` \
| %{__sed} -e s+%{buildroot}++g \
> %{buildroot}/var/adm/perl-modules/%{name}
fi
# remove special files
find %{buildroot} -name "perllocal.pod" \
-o -name ".packlist" \
-o -name "*.bs" \
|xargs -i rm -f {}
# no empty directories
find %{buildroot}%{_prefix} \
-type d -depth \
-exec rmdir {} \; 2>/dev/null
%{__perl} -MFile::Find -le '
find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
print "%doc html";
for my $x (sort @dirs, @files) {
push @ret, $x unless indirs($x);
}
print join "\n", sort @ret;
sub wanted {
return if /auto$/;
local $_ = $File::Find::name;
my $f = $_; s|^\Q%{buildroot}\E||;
return unless length;
return $files[@files] = $_ if -f $f;
$d = $_;
/\Q$d\E/ && return for reverse sort @INC;
$d =~ /\Q$_\E/ && return
for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
$dirs[@dirs] = $_;
}
sub indirs {
my $x = shift;
$x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
}
' > %filelist
[ -z %filelist ] && {
echo "ERROR: empty %files listing"
exit -1
}
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%files -f %filelist
%defattr(-,root,root)
%changelog
* Sun Apr 29 2007 Shad L. Lords
- Clean up spec so package can be built by koji/plague
* Tue Feb 13 2007 Charlie Brady
- Avoid portability problem with File::Basename::basename. [SME: 2472]
* Thu Dec 07 2006 Shad L. Lords
- Update to new release naming. No functional changes.
- Make Packager generic
* Wed Sep 13 2006 Michael Soulier 0.22-6es01
- Added stringify of cgi params as black magic workaround to undetermined
crash in Data::Dumper::Dumpxs. [sme 1837]
* Thu Nov 11 2004 Charlie Brady 0.22-6
- Gracefully handle missing $id arg in constructor.
* Mon Sep 27 2004 Charlie Brady
- [0.22-5]
- Replace deprecated Copyright header with License header.
- Use new cpan2rpm template for build and install sections, for compatibility
with later perl/rpm.
- Roll release number for new CentOS build.
* Wed Sep 04 2002 Mark Knox
- [0.22-4]
- Better handling of session directory to eliminate some warnings [markk 4768]
* Fri Aug 16 2002 Mark Knox
- [0.22-3]
- Changed to not use full paths in .id field, and to store session directory
from new() [markk 4652]
* Wed May 15 2002 Kirrily Robert
- [0.22-2]
- Added no-xhtml pragma to 'use CGI' to avoid l10n weirdness [skud 3390]
* Mon Feb 18 2002 charlieb
- Spec file automatically generated by cpan2rpm