]> git.pld-linux.org Git - packages/apache-mod_perl.git/blobdiff - apache-mod_perl.spec
- reverse bcond
[packages/apache-mod_perl.git] / apache-mod_perl.spec
index ac9d23780793463e94f06c95b267d81e4d686c40..e15eb79290715862ff7a8ec21db168fd9639f487 100644 (file)
@@ -1,8 +1,11 @@
 # TODO:
-# - add devel subpackage
+# - separate perl-things from apache libs and configs (needed for some buildings)
+# - separate devel things from runtime things (apache-mod_perl-2.0.2-2 marks perl-ExtUtils-MakeMaker-6.25_08-1 (cap perl(ExtUtils::Install)))
+%bcond_with    internal_test   # use internal Apache-Test
+#
 %include       /usr/lib/rpm/macros.perl
-%bcond_with    apache1 # use apache1 instead of apache
-%define        apxs    /usr/sbin/apxs%{?with_apache1:1}
+%define        apxs    /usr/sbin/apxs
+%define        apache_test_version     1.27-2
 Summary:       A Perl interpreter for the Apache Web server
 Summary(cs):   Vestavìný interpret Perlu pro WWW server Apache
 Summary(da):   En indbygget Perl-fortolker for webtjeneren Apache
@@ -13,8 +16,8 @@ Summary(id):  Interpreter Perl untuk web server Apache
 Summary(is):   Perl túlkur fyrir Apache vefþjóninn
 Summary(it):   Interprete Perl integrato per il server Web Apache
 Summary(ja):   Apache Web ¥µ¡¼¥Ð¡¼ÍѤÎÁȹþ¤ß Perl ¥¤¥ó¥¿¡¼¥×¥ê¥¿
-Summary(no):   En Perl-fortolker for webtjeneren Apache
-Summary(pl):   Interpreter perla dla serwera WWW Apache
+Summary(nb):   En Perl-fortolker for webtjeneren Apache
+Summary(pl):   Interpreter Perla dla serwera WWW Apache
 Summary(pt):   Um interpretador de Perl embebido para o servidor Web Apache
 Summary(ru):   ÷ÓÔÒÏÅÎÎÙÊ ÉÎÔÅÒÐÒÅÔÁÔÏÒ Perl ÄÌÑ WWW-ÓÅÒ×ÅÒÁ Apache
 Summary(sk):   Interpreter jazyka Perl pre webový server Apache
@@ -23,35 +26,42 @@ Summary(sv):        En inbyggd Perl-interpretator f
 Summary(uk):   íÏÄÕÌØ ×ÂÕÄÏ×Õ×ÁÎÎÑ ¦ÎÔÅÒÐÒÅÔÁÔÏÒÁ Perl × ÓÅÒ×ÅÒ Apache
 Summary(zh_CN):        ÓÃÓÚ Apache web ·þÎñ³ÌÐòµÄ Perl ½âÊͳÌÐò¡£
 Name:          apache-mod_perl
-Version:       1.27
-Release:       2
-License:       GPL
+Version:       2.0.2
+Release:       5
+Epoch:         1
+License:       Apache
 Group:         Networking/Daemons
 Source0:       http://perl.apache.org/dist/mod_perl-%{version}.tar.gz
-# Source0-md5: bd07f4f1065eb0d0a8d8004219357d8c
-Patch0:                apache-perl-rh.patch
-# from ftp://ftp.kddlabs.co.jp/Linux/packages/Kondara/pub/Jirai/
-Patch1:                mod_perl-v6.patch
-BuildRequires: apache(EAPI)-devel
+# Source0-md5: ad0a509fd34e3b8452887d80a1d45dea
+Source1:       %{name}.conf
+Patch0:                %{name}-Makefile_PL.patch
+URL:           http://perl.apache.org/
+BuildRequires: apache-devel >= 2.0.55-1
+BuildRequires: apr-util-devel >= 1:1.0.0
+BuildRequires: expat-devel
 BuildRequires: gdbm-devel
-BuildRequires: perl >= 5.6.1
-BuildRequires: perl-B-Graph
-BuildRequires: perl-BSD-Resource
-BuildRequires: perl-Devel-Symdump
-BuildRequires: perl-HTML-Parser
-BuildRequires: perl-MIME-Base64
-BuildRequires: perl-URI
-BuildRequires: perl-libwww
+BuildRequires: openldap-devel >= 2.3.0
+%{!?internal_test:BuildRequires:       perl-Apache-Test = %{apache_test_version}}
+BuildRequires: perl-devel >= 1:5.8.2
 BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: %{apxs}
-PreReq:                apache(EAPI)
-Requires(post,preun):  %{apxs}
+%requires_eq_to        apache apache-devel
+Requires:      apache(modules-api) = %apache_modules_api
+Requires:      perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
+Provides:      apache(mod_perl)
+# What's this mod_perl_hooks for?
 Provides:      perl(mod_perl_hooks)
-Provides:      mod_perl
+# not sure is this neccessary
+%{!?internal_test:Requires:    perl-Apache-Test = %{apache_test_version}}
 Obsoletes:     mod_perl
 Obsoletes:     mod_perl-common
+Conflicts:     perl-modules < 1:5.8.6-6
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# TODO: separate -devel with ExtUtils::Embed and friends?
+%define                _noautoreq      'perl(Apache::.*)' 'perl(mod_perl)' 'perl(ModPerl::.*)' 'perl(ExtUtils::Embed)' 'perl(Module::Build)'
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+
 %description
 Mod_perl incorporates a Perl interpreter into the Apache web server,
 so that the Apache web server can directly execute Perl code. Mod_perl
@@ -127,7 +137,7 @@ CGI 
 
 %description -l pl
 Mod_perl jest modu³em, który wyposa¿a serwer Apache w interpreter
-perla, umo¿liwiaj±c w ten sposób bezpo¶rednie wykonywanie kodu perla
+Perla, umo¿liwiaj±c w ten sposób bezpo¶rednie wykonywanie kodu Perla
 przez serwer bez potrzeby anga¿owania zewnêtrznego interpretera, co
 przyspiesza procesy zwi±zane z uruchamianiem skryptów CGI.
 
@@ -182,87 +192,99 @@ Apache web 
 ½Ó¿Ú¡£ ÓÉÓÚ²»±ØÆô¶¯ÈκÎÍⲿ Perl ½âÊͳÌÐò£¬Òò´Ë»áʹ CGI
 ½Å±¾»Øת¹ý³Ì¸üΪ¿ìËÙ¡£
 
+%package devel
+Summary:       Files needed for building XS modules that use mod_perl
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      apache-devel >= 2.0
+
+%description devel
+The apache-mod_perl-devel package contains the files needed for
+building XS modules that use mod_perl.
+
 %prep
-%setup  -q -n mod_perl-%{version}
+%setup -q -n mod_perl-%{version}
 %patch0 -p1
-%patch1 -p1
+
+if %{without internal_test}
+system=$(%{__perl} -MApache::Test -e 'print Apache::Test->VERSION')
+bundled=$(%{__perl} -IApache-Test/lib -MApache::Test -e 'print Apache::Test->VERSION')
+if [ "$system" != "$bundled" ]; then
+       : Need Apache::Test version $bundled installed in system. please fix.
+       exit 1
+fi
+rm -rf Apache-Test
+%endif
 
 %build
-perl Makefile.PL \
-       USE_APXS=1 \
-       WITH_APXS=%{apxs} \
-       EVERYTHING=1 \
-       PERL_STACKED_HANDLERS=1 \
+%{__perl} Makefile.PL \
+       MP_APXS=%{apxs} \
+       MP_APR_CONFIG=%{_bindir}/apr-1-config \
+       MP_APU_CONFIG=%{_bindir}/apu-1-config \
        INSTALLDIRS=vendor
 
-(cd apaci; ln -s ../src/modules .; chmod +x find_source)
-%{__make}
-
-cd faq
-%{__make}
+%{__make} \
+       OPTIMIZE="%{rpmcflags}" \
+       MODPERL_OPTIMIZE="%{rpmcflags}" \
+       CC="%{__cc}" \
+       MP_APXS=%{apxs}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir}/apache,/home/httpd/manual/mod}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name \*.orig -exec rm -f '{}' \;
 
-%{__make} pure_install DESTDIR=$RPM_BUILD_ROOT
+install xs/tables/current/Apache2/* $RPM_BUILD_ROOT%{perl_vendorarch}/Apache2
+install xs/tables/current/APR/* $RPM_BUILD_ROOT%{perl_vendorarch}/APR
+install xs/tables/current/ModPerl/* $RPM_BUILD_ROOT%{perl_vendorarch}/ModPerl
 
-install apaci/libperl.so $RPM_BUILD_ROOT%{_libdir}/apache
-install htdocs/manual/mod/mod_perl.html \
-       $RPM_BUILD_ROOT/home/httpd/manual/mod
+rm -rf $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle
+rm -f $RPM_BUILD_ROOT%{_mandir}/man?/Bundle*
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/75_mod_perl.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n perl %{_libexecdir}/libperl.so 1>&2
 if [ -f /var/lock/subsys/httpd ]; then
        /etc/rc.d/init.d/httpd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
 fi
 
 %preun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n perl %{_libexecdir}/libperl.so 1>&2
        if [ -f /var/lock/subsys/httpd ]; then
                /etc/rc.d/init.d/httpd restart 1>&2
        fi
 fi
 
-
 %files
 %defattr(644,root,root,755)
-%doc README INSTALL CREDITS faq/*.html faq/*.txt apache-modlist.html eg
-%doc /home/httpd/manual/mod/*html
-
-%attr(755,root,root) %{_libdir}/apache/*.so
-
-#%{perl_sitearch}/*.pm
-#%{perl_sitearch}/*.PL
-
-%dir %{perl_vendorarch}/Apache
-%dir %{perl_vendorarch}/auto/Apache
-%dir %{perl_vendorarch}/auto/Apache/Leak
-%dir %{perl_vendorarch}/auto/Apache/Symbol
-%{perl_vendorarch}/Apache.pm
-%{perl_vendorarch}/Apache/*.pm
-%{perl_vendorarch}/Apache/Constants
-
-%attr(755,root,root) %{perl_vendorarch}/auto/Apache/Leak/Leak.so
-%attr(755,root,root) %{perl_vendorarch}/auto/Apache/Symbol/Symbol.so
-
-%{perl_vendorarch}/auto/Apache/Leak/Leak.bs
-%{perl_vendorarch}/auto/Apache/Symbol/Symbol.bs
+%doc Changes INSTALL README STATUS
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
 
 %{perl_vendorarch}/*.pm
+%{perl_vendorarch}/APR
+%{perl_vendorarch}/Apache2
+%{perl_vendorarch}/ModPerl
 
+%dir %{perl_vendorarch}/auto/*
+%{perl_vendorarch}/auto/*/*.bs
+%attr(755,root,root) %{perl_vendorarch}/auto/*/*.so
+%dir %{perl_vendorarch}/auto/APR/[B-U]*
+%dir %{perl_vendorarch}/auto/Apache2/[A-U]*
+%dir %{perl_vendorarch}/auto/ModPerl/*
+%{perl_vendorarch}/auto/*/*/*.ix
+%{perl_vendorarch}/auto/*/*/*.bs
+%attr(755,root,root) %{perl_vendorarch}/auto/*/*/*.so
 
-#%{perl_sitearch}/auto/*/*/*.bs
+%{perl_vendorarch}/auto/Apache2/typemap
 
-%{_mandir}/man3/[Acm]*
+%{_mandir}/man?/*
 
-# to -devel ?
-#%{perl_sitearch}/auto/Apache/typemap
-#%{perl_sitearch}/auto/Apache/mod_perl.exp
-#%{perl_sitearch}/auto/Apache/include
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/apache/*.h
This page took 0.194694 seconds and 4 git commands to generate.