8
0

Accepting request 54192 from Apache:Modules

Accepted submit request 54192 from user coolo

OBS-URL: https://build.opensuse.org/request/show/54192
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache2-mod_perl?expand=0&rev=12
This commit is contained in:
2010-11-30 23:13:42 +00:00
committed by Git OBS Bridge
parent b9bd49cbc5
commit 899dee1871
2 changed files with 42 additions and 16 deletions

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Nov 25 18:09:09 UTC 2010 - chris@computersalat.de
- fix perl_process_packlist stuff
o remove .packlist, perllocal.pod files
- cleanupo spec
o replace 'mkdir -p' with 'install -d' or 'install -D'
o macros
-------------------------------------------------------------------
Fri Mar 5 12:02:09 UTC 2010 - coolo@novell.com

View File

@@ -111,7 +111,7 @@ software depending on apache2-mod_perl.
find -name ".svn" -type d | xargs rm -rfv
%build
perl Makefile.PL MP_APXS=`which %{apxs}` MP_CCOPTS="$(%{apxs} -q CFLAGS)"
perl Makefile.PL INSTALLDIRS=vendor MP_APXS=`which %{apxs}` MP_CCOPTS="$(%{apxs} -q CFLAGS)"
ln -s Apache-mod_perl_guide-1.29/bin bin
make
# XXX mod_include/SSI does not include files when they are not named .shtml
@@ -167,14 +167,31 @@ t/TEST -stop-httpd
%endif
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install_vendor
mkdir -p $RPM_BUILD_ROOT/%{apache_libexecdir}
cp -p src/modules/perl/mod_perl.so $RPM_BUILD_ROOT/%{apache_libexecdir}
mkdir -p $RPM_BUILD_ROOT/%{apache_includedir}/modules/perl
cp src/modules/perl/*.h $RPM_BUILD_ROOT/%{apache_includedir}/modules/perl/
%perl_make_install
### since 11.4 perl_process_packlist
### removes .packlist, perllocal.pod files
%if 0%{?suse_version} > 1130
%perl_process_packlist
mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d
%else
# do not perl_process_packlist
# remove .packlist file
find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm ;
# remove perllocal.pod file
%{__rm} -f $RPM_BUILD_ROOT%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
#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/
#mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d
%{__install} -d $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d
cat > $RPM_BUILD_ROOT/%{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!"; }
@@ -198,7 +215,10 @@ cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/mod_perl-startup.pl <<-EOF
use APR::Const -compile => ':common';
1;
EOF
mkdir -p $RPM_BUILD_ROOT/%{apache_serverroot}/perl-lib
#mkdir -p $RPM_BUILD_ROOT/%{apache_serverroot}/perl-lib
%{__install} -d $RPM_BUILD_ROOT/%{apache_serverroot}/perl-lib
cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/mod_perl.conf <<EOF
<Directory "%{apache_serverroot}/perl-lib">
AllowOverride None
@@ -229,12 +249,10 @@ cat > $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/mod_perl.conf <<EOF
# vim: ft=apache
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/
# remove unwanted files
find $RPM_BUILD_ROOT/%{perl_sitearch} -name .packlist | xargs --no-run-if-empty rm -v
%{__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/
%files
%defattr(-,root,root)
@@ -242,7 +260,6 @@ find $RPM_BUILD_ROOT/%{perl_sitearch} -name .packlist | xargs --no-run-if-empty
%doc docs
%dir %{apache_libexecdir}
%{apache_libexecdir}/mod_perl.so
/var/adm/perl-modules/%{name}
%config(noreplace) %{apache_sysconfdir}/mod_perl-startup.pl
%config(noreplace) %{apache_sysconfdir}/conf.d/mod_perl.conf
%dir %{apache_serverroot}/perl-lib