diff --git a/apache2-mod_perl.changes b/apache2-mod_perl.changes index c0e9118..6cb9fd3 100644 --- a/apache2-mod_perl.changes +++ b/apache2-mod_perl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 3 09:08:50 UTC 2014 - pgajdos@suse.com + +- call spec-cleaner +- use apache rpm macros + ------------------------------------------------------------------- Wed Sep 17 10:35:26 UTC 2014 - jsegitz@suse.com diff --git a/apache2-mod_perl.spec b/apache2-mod_perl.spec index 9888f90..6c05e9f 100644 --- a/apache2-mod_perl.spec +++ b/apache2-mod_perl.spec @@ -1,4 +1,3 @@ -# vim: ft=apache # # spec file for package apache2-mod_perl # @@ -18,6 +17,19 @@ Name: apache2-mod_perl +Version: 2.0.8 +Release: 0 +Summary: Embedded Perl for Apache +License: Apache-2.0 +Group: Productivity/Networking/Web/Servers +Url: http://perl.apache.org/ +Source0: http://ftp.de.debian.org/debian/pool/main/liba/libapache2-mod-perl2/libapache2-mod-perl2_2.0.8+httpd24-r1449661.orig.tar.gz +Patch0: %{name}-2.0.4-tests.diff +# PATCH-NEEDS-REBASE +Patch1: lfs-perl-5.14.patch +Patch2: avoid-broken-provides.diff +Patch3: apache24-mod_authz_host.patch +BuildRequires: apache-rpm-macros BuildRequires: apache2-devel BuildRequires: db-devel BuildRequires: ed @@ -29,19 +41,6 @@ BuildRequires: perl-Compress-Zlib BuildRequires: perl-Tie-IxHash BuildRequires: perl-libwww-perl BuildRequires: sudo -%if 0%{sles_version} == 9 -BuildRequires: openldap2-devel -%endif -%define apxs /usr/sbin/apxs2 -%define apache apache2 -%define apache_libexecdir %(%{apxs} -q LIBEXECDIR) -%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR) -%define apache_includedir %(%{apxs} -q INCLUDEDIR) -%define apache_serverroot %(%{apxs} -q PREFIX) -%define apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN) -Summary: Embedded Perl for Apache -License: Apache-2.0 -Group: Productivity/Networking/Web/Servers Requires: %{apache_mmn} Requires: apache2 Requires: perl = %{perl_version} @@ -50,19 +49,13 @@ Requires: perl-Tie-IxHash Requires: perl-URI Requires: perl-libwww-perl Requires: perl(Linux::Pid) -Url: http://perl.apache.org/ Obsoletes: mod_perl_2 -Conflicts: mod_perl -Version: 2.0.8 -Release: 0 -Source0: http://ftp.de.debian.org/debian/pool/main/liba/libapache2-mod-perl2/libapache2-mod-perl2_2.0.8+httpd24-r1449661.orig.tar.gz -Patch: %{name}-2.0.4-tests.diff -# PATCH-NEEDS-REBASE -Patch1: lfs-perl-5.14.patch -Patch2: avoid-broken-provides.diff -Patch3: apache24-mod_authz_host.patch -Icon: mod_perl.xpm BuildRoot: %{_tmppath}/%{name}-%{version}-build +Conflicts: mod_perl +Icon: mod_perl.xpm +%if 0%{?sles_version} == 9 +BuildRequires: openldap2-devel +%endif %description The Apache/Perl integration project brings together the full power of @@ -94,15 +87,13 @@ Most mod_perl handlers use the perl-script handler. Scripts can run in 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 -/etc/apache2/conf.d/mod_perl.conf about this configuration. - - +%{_sysconfdir}/apache2/conf.d/mod_perl.conf about this configuration. %package devel Summary: Embedded Perl for Apache - Development package Group: Productivity/Networking/Web/Servers Requires: %{name} = %{version} -Provides: apache2-mod_perl:/usr/include/apache2/modules/perl/modperl_cgi.h +Provides: apache2-mod_perl:%{_includedir}/apache2/modules/perl/modperl_cgi.h %description devel The Apache/Perl integration project brings together the full power of @@ -111,8 +102,6 @@ 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. - - %prep #%setup -q -n modperl-2.0 -a 1 %setup -q -n httpd24 @@ -122,18 +111,18 @@ software depending on apache2-mod_perl. find -name ".svn" -type d | xargs rm -rfv %build -perl Makefile.PL INSTALLDIRS=vendor MP_APXS=`which %{apxs}` MP_APR_CONFIG=/usr/bin/apr-1-config MP_CCOPTS="$(%{apxs} -q CFLAGS)" +perl Makefile.PL INSTALLDIRS=vendor MP_APXS=`which %{apache_apxs}` MP_APR_CONFIG=%{_bindir}/apr-1-config MP_CCOPTS="%{apache_cflags}" ln -s Apache-mod_perl_guide-1.29/bin bin make %{?_smp_mflags} # XXX mod_include/SSI does not include files when they are not named .shtml mv t/htdocs/includes-registry/test.pl t/htdocs/includes-registry/test.shtml mv t/htdocs/includes-registry/cgipm.pl t/htdocs/includes-registry/cgipm.shtml sed 's/\.pl/.shtml/' t/htdocs/includes/test.shtml > tmpfile && mv tmpfile t/htdocs/includes/test.shtml -%ifnarch %arm +%ifnarch %{arm} # # Run tests # -# Don't use sendfile because most systems on which this package will be built don't run a +# Don't use sendfile because most systems on which this package will be built don't run a # kernel that has it implemented, actually # (Files smaller than 256 bytes will be delivered via conventional read/write, so most of the tests would pass nevertheless.) echo -e '\n\nEnableSendfile off' >> t/conf/extra.conf.in @@ -148,20 +137,20 @@ if test -e ModPerl-Registry/t/cgi-bin/r_inherited.pl; then chmod +x ModPerl-Regi # enable more apache modules # we can't simply use a2enmod, since we are not root. cat >> t/conf/extra.conf.in <<-EOF - #LoadModule access_compat_module /usr/%_lib/apache2-prefork/mod_access_compat.so - LoadModule authn_core_module /usr/%_lib/apache2-prefork/mod_authn_core.so - LoadModule authz_core_module /usr/%_lib/apache2-prefork/mod_authz_core.so - #LoadModule unixd_module /usr/%_lib/apache2-prefork/mod_unixd.so - LoadModule deflate_module /usr/%_lib/apache2-prefork/mod_deflate.so - LoadModule proxy_module /usr/%_lib/apache2-prefork/mod_proxy.so - LoadModule proxy_http_module /usr/%_lib/apache2-prefork/mod_proxy_http.so + #LoadModule access_compat_module %{_prefix}/%_lib/apache2-prefork/mod_access_compat.so + LoadModule authn_core_module %{_libdir}/apache2-prefork/mod_authn_core.so + LoadModule authz_core_module %{_libdir}/apache2-prefork/mod_authz_core.so + #LoadModule unixd_module %{_prefix}/%_lib/apache2-prefork/mod_unixd.so + 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 EOF mkdir -p t/htdocs/hooks chmod 2770 t/htdocs/hooks # # run test suite: # -#make TEST_VERBOSE=1 APACHE_TEST_PORT=select APACHE_TEST_STARTUP_TIMEOUT=360 test || { +#make TEST_VERBOSE=1 APACHE_TEST_PORT=select APACHE_TEST_STARTUP_TIMEOUT=360 test || { # ps aufx | grep "/usr/sbin/httpd2-prefork -d /usr/src/packages/BUILD/modperl-2.0" \ # | grep -v grep | awk '{print $2}' | xargs -r kill # exit 1 @@ -191,24 +180,24 @@ t/TEST -stop-httpd %else # do not perl_process_packlist # remove .packlist file -find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm ; +find %{buildroot}%{perl_vendorarch}/auto -name .packlist -print0 | xargs -0 -r rm ; # remove perllocal.pod file -%{__rm} -f $RPM_BUILD_ROOT%perl_archlib/perllocal.pod +rm -f %{buildroot}%{perl_archlib}/perllocal.pod %endif #mkdir -p $RPM_BUILD_ROOT/%{apache_libexecdir} #cp -p src/modules/perl/mod_perl.so $RPM_BUILD_ROOT/%{apache_libexecdir} -%{__install} -D src/modules/perl/mod_perl.so \ - $RPM_BUILD_ROOT/%{apache_libexecdir}/mod_perl.so +install -D src/modules/perl/mod_perl.so \ + %{buildroot}/%{apache_libexecdir}/mod_perl.so #mkdir -p $RPM_BUILD_ROOT/%{apache_includedir}/modules/perl -%{__install} -d $RPM_BUILD_ROOT/%{apache_includedir}/modules/perl -%{__cp} src/modules/perl/*.h $RPM_BUILD_ROOT/%{apache_includedir}/modules/perl/ +install -d %{buildroot}/%{apache_includedir}/modules/perl +cp src/modules/perl/*.h %{buildroot}/%{apache_includedir}/modules/perl/ #mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d -%{__install} -d $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d +install -d %{buildroot}/%{apache_sysconfdir}/conf.d -cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/mod_perl-startup.pl <<-EOF +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); @@ -233,9 +222,9 @@ cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/mod_perl-startup.pl <<-EOF EOF #mkdir -p $RPM_BUILD_ROOT/%{apache_serverroot}/perl-lib -%{__install} -d $RPM_BUILD_ROOT/%{apache_serverroot}/perl-lib +install -d %{buildroot}/%{apache_serverroot}/perl-lib -cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/mod_perl.conf < %{buildroot}/%{apache_sysconfdir}/conf.d/mod_perl.conf < AllowOverride None Options None @@ -248,7 +237,7 @@ cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/mod_perl.conf < - PerlRequire "/etc/apache2/mod_perl-startup.pl" + PerlRequire "%{_sysconfdir}/apache2/mod_perl-startup.pl" ScriptAlias /perl/ "%{apache_serverroot}/cgi-bin/" # mod_perl mode @@ -269,11 +258,11 @@ cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/mod_perl.conf < EOF # install documentation files alongside perl modules, where applicable -%{__cp} -av docs/api/*.pod $RPM_BUILD_ROOT/%{perl_vendorarch}/ -%{__cp} -av docs/api/APR/*.pod $RPM_BUILD_ROOT/%{perl_vendorarch}/APR/ -%{__cp} -av docs/api/Apache2/*.pod $RPM_BUILD_ROOT/%{perl_vendorarch}/Apache2/ -%{__cp} -av docs/api/ModPerl/*.pod $RPM_BUILD_ROOT/%{perl_vendorarch}/ModPerl/ -find "%{buildroot}" -type f -name '*.orig' -delete -print +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/ +find %{buildroot} -type f -name '*.orig' -delete -print %files %defattr(-,root,root) @@ -296,7 +285,7 @@ find "%{buildroot}" -type f -name '*.orig' -delete -print %{perl_vendorarch}/auto/* %{perl_vendorarch}/mod_perl2.pm %{perl_vendorarch}/*.pod -/usr/bin/mp2bug +%{_bindir}/mp2bug %files devel %defattr(-,root,root)