| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | #
 | 
					
						
							| 
									
										
										
										
											2011-05-24 12:04:16 +00:00
										 |  |  | # spec file for package apache2-mod_perl
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | #
 | 
					
						
							| 
									
										
										
										
											2015-07-16 17:01:50 +00:00
										 |  |  | # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | #
 | 
					
						
							| 
									
										
										
										
											2008-11-06 21:00:06 +00:00
										 |  |  | # All modifications and additions to the file contributed by third parties
 | 
					
						
							|  |  |  | # remain the property of their copyright owners, unless otherwise agreed
 | 
					
						
							|  |  |  | # upon. The license for this file, and modifications and additions to the
 | 
					
						
							|  |  |  | # file, is the same license as for the pristine package itself (unless the
 | 
					
						
							|  |  |  | # license for the pristine package is not an Open Source License, in which
 | 
					
						
							|  |  |  | # case the license is the MIT License). An "Open Source License" is a
 | 
					
						
							|  |  |  | # license that conforms to the Open Source Definition (Version 1.9)
 | 
					
						
							|  |  |  | # published by the Open Source Initiative.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | # Please submit bugfixes or comments via http://bugs.opensuse.org/
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | %define srcname mod_perl
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | Name:           apache2-mod_perl
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | Version:        2.0.9
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | Release:        0
 | 
					
						
							|  |  |  | Summary:        Embedded Perl for Apache
 | 
					
						
							|  |  |  | License:        Apache-2.0
 | 
					
						
							|  |  |  | Group:          Productivity/Networking/Web/Servers
 | 
					
						
							|  |  |  | Url:            http://perl.apache.org/
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | Source0:        http://apache.miloslavbrada.cz/perl/%{srcname}-%{version}.tar.gz
 | 
					
						
							|  |  |  | Patch0:         inline.patch
 | 
					
						
							|  |  |  | Patch1:         avoid-broken-provides.diff
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | BuildRequires:  apache-rpm-macros
 | 
					
						
							| 
									
										
										
										
											2012-02-15 22:41:54 +00:00
										 |  |  | BuildRequires:  apache2-devel
 | 
					
						
							|  |  |  | BuildRequires:  db-devel
 | 
					
						
							|  |  |  | BuildRequires:  ed
 | 
					
						
							| 
									
										
										
										
											2012-10-11 14:47:07 +00:00
										 |  |  | BuildRequires:  netcfg
 | 
					
						
							| 
									
										
										
										
											2012-02-15 22:41:54 +00:00
										 |  |  | BuildRequires:  pcre-devel
 | 
					
						
							|  |  |  | BuildRequires:  perl
 | 
					
						
							|  |  |  | BuildRequires:  perl-BSD-Resource
 | 
					
						
							|  |  |  | BuildRequires:  perl-Compress-Zlib
 | 
					
						
							|  |  |  | BuildRequires:  perl-Tie-IxHash
 | 
					
						
							|  |  |  | BuildRequires:  perl-libwww-perl
 | 
					
						
							|  |  |  | BuildRequires:  sudo
 | 
					
						
							| 
									
										
										
										
											2012-06-01 09:57:01 +00:00
										 |  |  | Requires:       %{apache_mmn}
 | 
					
						
							| 
									
										
										
										
											2015-07-16 17:01:50 +00:00
										 |  |  | Requires:       %{apache_suse_maintenance_mmn}
 | 
					
						
							| 
									
										
										
										
											2012-06-01 09:57:01 +00:00
										 |  |  | Requires:       apache2
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | Requires:       perl = %{perl_version}
 | 
					
						
							| 
									
										
										
										
											2012-06-01 09:57:01 +00:00
										 |  |  | Requires:       perl-HTML-Parser
 | 
					
						
							|  |  |  | Requires:       perl-Tie-IxHash
 | 
					
						
							|  |  |  | Requires:       perl-URI
 | 
					
						
							|  |  |  | Requires:       perl-libwww-perl
 | 
					
						
							| 
									
										
										
										
											2014-08-01 11:08:35 +00:00
										 |  |  | Requires:       perl(Linux::Pid)
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | Obsoletes:      mod_perl_2
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | Conflicts:      mod_perl
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | Icon:           mod_perl.xpm
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %description
 | 
					
						
							|  |  |  | The Apache/Perl integration project brings together the full power of
 | 
					
						
							|  |  |  | the Perl programming language and the Apache HTTP server.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | With mod_perl, it is possible to write Apache modules entirely in Perl.
 | 
					
						
							|  |  |  | The persistent interpreter embedded in the server avoids the overhead
 | 
					
						
							|  |  |  | of starting an external interpreter and the penalty of Perl start-up
 | 
					
						
							|  |  |  | time.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Note that you do not need mod_perl to run perl scripts via the common
 | 
					
						
							|  |  |  | gateway interface (CGI). mod_perl enables you to run Perl scripts in an
 | 
					
						
							|  |  |  | embedded interpreter if the additional performance is needed, but may
 | 
					
						
							|  |  |  | require modifications to the scripts.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Usage:
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-01-23 17:00:17 +00:00
										 |  |  | To load the module into Apache, run the command "a2enmod perl" as root.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To learn about the configuration, the best reference unequivocally is
 | 
					
						
							|  |  |  | http://perl.apache.org/docs/
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | For porting 1.0 applications to 2.0, the page
 | 
					
						
							|  |  |  | http://perl.apache.org/docs/2.0/user/porting/compat.html should give
 | 
					
						
							|  |  |  | the required information.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Most mod_perl handlers use the perl-script handler. Scripts can run in
 | 
					
						
							|  |  |  | "mod_perl mode" (preconfigured for URLs starting with /perl/) or "perl
 | 
					
						
							|  |  |  | cgi mode" (preconfigured for URLs starting /cgi-perl). Plain CGI
 | 
					
						
							|  |  |  | scripts can be run via /cgi-bin/. In all these cases, the script would
 | 
					
						
							|  |  |  | be placed inside the /srv/www/cgi-bin/ directory. Refer to
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | %{_sysconfdir}/apache2/conf.d/mod_perl.conf about this configuration.
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-06-14 14:27:04 +00:00
										 |  |  | %package devel
 | 
					
						
							|  |  |  | Summary:        Embedded Perl for Apache - Development package
 | 
					
						
							|  |  |  | Group:          Productivity/Networking/Web/Servers
 | 
					
						
							|  |  |  | Requires:       %{name} = %{version}
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | Provides:       apache2-mod_perl:%{_includedir}/apache2/modules/perl/modperl_cgi.h
 | 
					
						
							| 
									
										
										
										
											2007-06-14 14:27:04 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %description devel
 | 
					
						
							|  |  |  | The Apache/Perl integration project brings together the full power of
 | 
					
						
							|  |  |  | the Perl programming language and the Apache HTTP server.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | This package contains the include files useful for developing new
 | 
					
						
							|  |  |  | software depending on apache2-mod_perl.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | %prep
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | %setup -q -n %{srcname}-%{version}
 | 
					
						
							|  |  |  | %patch0
 | 
					
						
							|  |  |  | %patch1 -p1
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %build
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | perl Makefile.PL INSTALLDIRS=vendor MP_APXS=%{apache_apxs} MP_APR_CONFIG=%{_bindir}/apr-1-config MP_CCOPTS="%{apache_cflags}"
 | 
					
						
							| 
									
										
										
										
											2011-09-19 09:11:02 +00:00
										 |  |  | make %{?_smp_mflags}
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | #
 | 
					
						
							|  |  |  | # Run tests
 | 
					
						
							|  |  |  | #
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | %ifnarch %{arm}
 | 
					
						
							|  |  |  | mkdir t/run
 | 
					
						
							|  |  |  | # workaround for 32-bit where /usr/lib64/apache2-prefork is hardcoded?
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | cat >> t/conf/extra.conf.in <<-EOF
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  |         LoadModule authn_core_module %{_libdir}/apache2-prefork/mod_authn_core.so
 | 
					
						
							|  |  |  |         LoadModule authz_core_module %{_libdir}/apache2-prefork/mod_authz_core.so
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  |         LoadModule authz_user_module %{_libdir}/apache2-prefork/mod_authz_user.so
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | 	LoadModule deflate_module    %{_libdir}/apache2-prefork/mod_deflate.so
 | 
					
						
							|  |  |  | 	LoadModule proxy_module      %{_libdir}/apache2-prefork/mod_proxy.so
 | 
					
						
							|  |  |  | 	LoadModule proxy_http_module %{_libdir}/apache2-prefork/mod_proxy_http.so
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | EOF
 | 
					
						
							|  |  |  | t/TEST -start-httpd -port select -startup_timeout 720
 | 
					
						
							| 
									
										
										
										
											2008-01-15 00:34:41 +00:00
										 |  |  | t/TEST -run-tests || true
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | t/TEST -stop-httpd
 | 
					
						
							|  |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | exit 0
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %install
 | 
					
						
							| 
									
										
										
										
											2010-11-30 23:13:42 +00:00
										 |  |  | %perl_make_install
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | # install /srv/www/perl-lib
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | install -d %{buildroot}/%{apache_serverroot}/perl-lib
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | # install /etc/apache2/conf.d/mod_perl.conf
 | 
					
						
							|  |  |  | install -d %{buildroot}/%{apache_sysconfdir}/conf.d
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | cat > %{buildroot}/%{apache_sysconfdir}/conf.d/mod_perl.conf <<EOF
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | <Directory "%{apache_serverroot}/perl-lib">
 | 
					
						
							|  |  |  |     AllowOverride None
 | 
					
						
							|  |  |  |     Options None
 | 
					
						
							| 
									
										
										
										
											2014-09-18 10:38:52 +00:00
										 |  |  |     <IfModule !mod_authz_host.c>
 | 
					
						
							|  |  |  |       Order allow,deny
 | 
					
						
							|  |  |  |       Deny from all
 | 
					
						
							|  |  |  |     </IfModule>
 | 
					
						
							|  |  |  |     <IfModule mod_authz_host.c>
 | 
					
						
							|  |  |  |       Require all granted
 | 
					
						
							|  |  |  |     </IfModule>
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | </Directory>
 | 
					
						
							|  |  |  | <IfModule mod_perl.c>
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  |     PerlRequire "%{_sysconfdir}/apache2/mod_perl-startup.pl"
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  |     ScriptAlias /perl/ "%{apache_serverroot}/cgi-bin/"
 | 
					
						
							|  |  |  |     <Location /perl/>
 | 
					
						
							|  |  |  | 	# mod_perl mode
 | 
					
						
							|  |  |  | 	SetHandler perl-script
 | 
					
						
							|  |  |  | 	PerlResponseHandler ModPerl::Registry
 | 
					
						
							|  |  |  | 	PerlOptions +ParseHeaders
 | 
					
						
							|  |  |  | 	Options +ExecCGI
 | 
					
						
							|  |  |  |     </Location>
 | 
					
						
							|  |  |  |     ScriptAlias /cgi-perl/ "%{apache_serverroot}/cgi-bin/"
 | 
					
						
							|  |  |  |     <Location /cgi-perl>
 | 
					
						
							|  |  |  | 	# perl cgi mode
 | 
					
						
							|  |  |  | 	SetHandler  perl-script
 | 
					
						
							|  |  |  | 	PerlResponseHandler ModPerl::PerlRun
 | 
					
						
							|  |  |  | 	PerlOptions +ParseHeaders
 | 
					
						
							|  |  |  | 	Options +ExecCGI
 | 
					
						
							|  |  |  |     </Location>
 | 
					
						
							|  |  |  |     # The /cgi-bin/ ScriptAlias is already set up in httpd.conf
 | 
					
						
							|  |  |  | </IfModule>
 | 
					
						
							|  |  |  | EOF
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | # install /etc/apache2/mod_perl-startup.pl
 | 
					
						
							|  |  |  | cat > %{buildroot}/%{apache_sysconfdir}/mod_perl-startup.pl <<-EOF
 | 
					
						
							|  |  |  |   # Taken from http://perl.apache.org/docs/2.0/user/handlers/server.html#Startup_File
 | 
					
						
							|  |  |  |   if ( ! \$ENV{MOD_PERL}) { die "GATEWAY_INTERFACE not Perl!"; }
 | 
					
						
							|  |  |  |   use lib qw(/srv/www/perl-lib);
 | 
					
						
							|  |  |  |   # enable if the mod_perl 1.0 compatibility is needed
 | 
					
						
							|  |  |  |   # use Apache2::compat ();
 | 
					
						
							|  |  |  |   # preload all mp2 modules
 | 
					
						
							|  |  |  |   # use ModPerl::MethodLookup;
 | 
					
						
							|  |  |  |   # ModPerl::MethodLookup::preload_all_modules();
 | 
					
						
							|  |  |  |   use ModPerl::Util (); #for CORE::GLOBAL::exit
 | 
					
						
							|  |  |  |   use Apache2::RequestRec ();
 | 
					
						
							|  |  |  |   use Apache2::RequestIO ();
 | 
					
						
							|  |  |  |   use Apache2::RequestUtil ();
 | 
					
						
							|  |  |  |   use Apache2::ServerRec ();
 | 
					
						
							|  |  |  |   use Apache2::ServerUtil ();
 | 
					
						
							|  |  |  |   use Apache2::Connection ();
 | 
					
						
							|  |  |  |   use Apache2::Log ();
 | 
					
						
							|  |  |  |   use APR::Table ();
 | 
					
						
							|  |  |  |   use ModPerl::Registry ();
 | 
					
						
							|  |  |  |   use Apache2::Const -compile => ':common';
 | 
					
						
							|  |  |  |   use APR::Const -compile => ':common';
 | 
					
						
							|  |  |  |   1;
 | 
					
						
							|  |  |  | EOF
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | # install documentation files alongside perl modules, where applicable
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | cp -av docs/api/*.pod %{buildroot}/%{perl_vendorarch}/
 | 
					
						
							|  |  |  | cp -av docs/api/APR/*.pod %{buildroot}/%{perl_vendorarch}/APR/
 | 
					
						
							|  |  |  | cp -av docs/api/Apache2/*.pod %{buildroot}/%{perl_vendorarch}/Apache2/
 | 
					
						
							|  |  |  | cp -av docs/api/ModPerl/*.pod %{buildroot}/%{perl_vendorarch}/ModPerl/
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | ### since 11.4 perl_process_packlist
 | 
					
						
							|  |  |  | ### removes .packlist, perllocal.pod files
 | 
					
						
							|  |  |  | %if 0%{?suse_version} > 1130
 | 
					
						
							|  |  |  | %perl_process_packlist
 | 
					
						
							|  |  |  | %else
 | 
					
						
							|  |  |  | # do not perl_process_packlist
 | 
					
						
							|  |  |  | # remove .packlist file
 | 
					
						
							|  |  |  | find %{buildroot}%{perl_vendorarch}/auto -name .packlist -print0 | xargs -0 -r rm ;
 | 
					
						
							|  |  |  | # remove perllocal.pod file
 | 
					
						
							|  |  |  | rm -f %{buildroot}%{perl_archlib}/perllocal.pod
 | 
					
						
							|  |  |  | %endif
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | %files
 | 
					
						
							|  |  |  | %defattr(-,root,root)
 | 
					
						
							| 
									
										
										
										
											2015-07-28 14:53:31 +00:00
										 |  |  | %doc Changes LICENSE README RELEASE STATUS
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | %doc docs
 | 
					
						
							|  |  |  | %dir %{apache_libexecdir}
 | 
					
						
							|  |  |  | %{apache_libexecdir}/mod_perl.so
 | 
					
						
							|  |  |  | %config(noreplace) %{apache_sysconfdir}/mod_perl-startup.pl
 | 
					
						
							|  |  |  | %config(noreplace) %{apache_sysconfdir}/conf.d/mod_perl.conf
 | 
					
						
							|  |  |  | %dir %{apache_serverroot}/perl-lib
 | 
					
						
							|  |  |  | %{_mandir}/man3/*
 | 
					
						
							|  |  |  | %{perl_vendorarch}/Apache
 | 
					
						
							|  |  |  | %{perl_vendorarch}/Apache2
 | 
					
						
							|  |  |  | %{perl_vendorarch}/APR
 | 
					
						
							|  |  |  | %{perl_vendorarch}/APR.pm
 | 
					
						
							|  |  |  | %{perl_vendorarch}/Bundle
 | 
					
						
							|  |  |  | %{perl_vendorarch}/ModPerl
 | 
					
						
							|  |  |  | %{perl_vendorarch}/auto/*
 | 
					
						
							|  |  |  | %{perl_vendorarch}/mod_perl2.pm
 | 
					
						
							|  |  |  | %{perl_vendorarch}/*.pod
 | 
					
						
							| 
									
										
										
										
											2014-11-11 11:59:33 +00:00
										 |  |  | %{_bindir}/mp2bug
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-06-14 14:27:04 +00:00
										 |  |  | %files devel
 | 
					
						
							|  |  |  | %defattr(-,root,root)
 | 
					
						
							| 
									
										
										
										
											2011-05-23 13:32:03 +00:00
										 |  |  | %{apache_includedir}/*
 | 
					
						
							| 
									
										
										
										
											2007-01-15 22:51:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-06-14 14:27:04 +00:00
										 |  |  | %changelog
 |