rpms/perl-Maypole/devel perl-Maypole-2.10-Apache2fix.patch, NONE, 1.1 perl-Maypole-2.10-SVNsessionfix.patch, NONE, 1.1 perl-Maypole.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Tom Callaway (spot) fedora-extras-commits at redhat.com
Thu Oct 13 02:36:44 UTC 2005


Author: spot

Update of /cvs/extras/rpms/perl-Maypole/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16984/devel

Modified Files:
	.cvsignore sources 
Added Files:
	perl-Maypole-2.10-Apache2fix.patch 
	perl-Maypole-2.10-SVNsessionfix.patch perl-Maypole.spec 
Log Message:
auto-import perl-Maypole-2.10-4 on branch devel from perl-Maypole-2.10-4.src.rpm

perl-Maypole-2.10-Apache2fix.patch:

--- NEW FILE perl-Maypole-2.10-Apache2fix.patch ---
--- Maypole-2.10/lib/Apache/MVC.pm.BAD	2005-10-06 14:29:09.000000000 -0500
+++ Maypole-2.10/lib/Apache/MVC.pm	2005-10-06 14:30:45.000000000 -0500
@@ -1,29 +1,39 @@
 package Apache::MVC;
 
-our $VERSION = '2.09';
+our $VERSION = '2.10';
 
 use strict;
 use warnings;
 
 use base 'Maypole';
-use mod_perl;
 use Maypole::Headers;
+use Maypole::Constants;
 
-use constant APACHE2 => $mod_perl::VERSION >= 1.99;
+__PACKAGE__->mk_accessors( qw( ar ) );
 
-if (APACHE2) {
-    require Apache2;
-    require Apache::RequestIO;
-    require Apache::RequestRec;
-    require Apache::RequestUtil;
-    require APR::URI;
+BEGIN {
+    my $version;
+    eval 'use mod_perl2; $version = $mod_perl2::VERSION; ';
+    if ($@) {
+       use mod_perl;
+       $version = 0;
+       require Apache;
+       require Apache::Request;
+
+    } else {
+       require Apache2::RequestIO;
+       require Apache2::RequestRec;
+       require Apache2::RequestUtil;
+       require APR::URI;
+       require Apache2::Request;
+    }
+
+    use constant APACHE2 => $version;
 }
-else { require Apache }
-require Apache::Request;
 
 sub get_request {
     my ( $self, $r ) = @_;
-    $self->{ar} = Apache::Request->new($r);
+    $self->{ar} = (APACHE2) ? Apache2::Request->new($r) : Apache::Request->new($r);
 }
 
 sub parse_location {

perl-Maypole-2.10-SVNsessionfix.patch:

--- NEW FILE perl-Maypole-2.10-SVNsessionfix.patch ---
--- Maypole-2.10/lib/Maypole/Session.pm.BAD	2005-10-07 10:18:18.000000000 -0500
+++ Maypole-2.10/lib/Maypole/Session.pm	2005-10-07 10:18:27.000000000 -0500
@@ -35,7 +35,7 @@
 sub generate_unique_id {
     my $length = shift || 32;
     my $id = substr(Digest::MD5::md5_hex(Digest::MD5::md5_hex(time(). {}. rand(). $$)), 0, $length);
-    return;
+    return $id;
 }
 
 


--- NEW FILE perl-Maypole.spec ---
Name:		perl-Maypole
Version:	2.10
Release:	4%{?dist}
Summary:	MVC web application framework
Group:		Development/Libraries
License:	GPL or Artistic
URL:            http://maypole.perl.org/
Source0:	http://search.cpan.org/CPAN/authors/id/T/TE/TEEJAY/Maypole-%{version}.tar.gz
Patch0:		perl-Maypole-2.10-Apache2fix.patch
Patch1:		perl-Maypole-2.10-SVNsessionfix.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
BuildRequires:  libapreq2-devel
BuildRequires:  perl(CGI::Untaint::date), perl(Class::DBI::mysql), perl(Class::DBI::AbstractSearch)
BuildRequires:  perl(CGI::Simple), perl(Class::DBI::AsForm), perl(Class::DBI::FromCGI)
BuildRequires:  perl(Class::DBI::Loader::Relationship), perl(Class::DBI::Pager)
BuildRequires:  perl(Class::DBI::Plugin::RetrieveAll), perl(Class::DBI::SQLite)
BuildRequires:  perl(Template::Plugin::Class), perl(Test::MockModule), perl(IO::CaptureOutput)
BuildRequires:	perl(Apache::Session::Wrapper), mod_perl
BuildRequires:	perl(Apache2::Request), perl(Test::Pod), perl(Class::DBI)
BuildRequires:	perl(Test::Pod::Coverage), perl(Class::DBI::Loader)
BuildRequires:	perl(Template)
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:	mod_perl

%description
Maypole is a Perl framework for MVC-oriented web 
applications, similar to Jakarta's Struts. Maypole 
is designed to minimize coding requirements for 
creating simple web interfaces to databases, while 
remaining flexible enough to support enterprise web 
applications.

%prep
%setup -q -n Maypole-%{version}
%patch0 -p1
%patch1 -p1

# Filter false positive requires
cat <<EOF > %{name}-req
#!/bin/sh
%{__perl_requires} \
| grep -v 'perl(mod_perl)'
EOF
%define __perl_requires %{_builddir}/Maypole-%{version}/%{name}-req
chmod +x %{__perl_requires}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
make pure_install DESTDIR=$RPM_BUILD_ROOT
cp -a templates $RPM_BUILD_ROOT%{_datadir}/%{name}
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc README Changes 
%{_datadir}/%{name}
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*

%changelog
* Wed Oct 12 2005 Tom "spot" Callaway <tcallawa at redhat.com> 2.10-4
- use perl_requires filter instead

* Fri Oct  7 2005 Tom "spot" Callaway <tcallawa at redhat.com> 2.10-3
- remove Maypole-Plugin-Session
- fix Maypole/Session.pm from SVN
- parse out perl(mod_perl) as a Requires (its false for every distro in FE)

* Thu Oct  6 2005 Tom "spot" Callaway <tcallawa at redhat.com> 2.10-2
- add explicit BRs
- use upstream apache fix
- add Maypole-Session test

* Wed Sep  7 2005 Tom "spot" Callaway <tcallawa at redhat.com> 2.10-1
- remove redundant BR: perl
- don't optimize, we're noarch
- include license text
- bump to Maypole 2.10 and Maypole-Plugin-Session 0.2

* Fri Jul  8 2005 Tom "spot" Callaway <tcallawa at redhat.com> 2.10-0.2.pre1
- cleanups

* Wed Jul 6 2005 Tom "spot" Callaway <tcallawa at redhat.com> 2.10-0.1.pre1
- initial package for Fedora Extras


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/perl-Maypole/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	13 Oct 2005 02:36:09 -0000	1.1
+++ .cvsignore	13 Oct 2005 02:36:42 -0000	1.2
@@ -0,0 +1 @@
+Maypole-2.10.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/perl-Maypole/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 Oct 2005 02:36:09 -0000	1.1
+++ sources	13 Oct 2005 02:36:42 -0000	1.2
@@ -0,0 +1 @@
+5d908a447d4e6f6364403aa56b1ab211  Maypole-2.10.tar.gz




More information about the scm-commits mailing list