]> git.pld-linux.org Git - packages/apache-mod_perl.git/blobdiff - apache-mod_perl.spec
- version 2.03 rc1
[packages/apache-mod_perl.git] / apache-mod_perl.spec
index 1291417fe58abd57c95f993ff68b21c7ff1a2981..ae1903d9489d195a061e36a67b6221b12e6f2bf8 100644 (file)
@@ -1,8 +1,14 @@
 # TODO:
-# - 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)))
+#
+# Conditional build:
+%bcond_without autodeps        # don't care about perl() deps resolving
+#
 %include       /usr/lib/rpm/macros.perl
-%define        apxs    /usr/sbin/apxs
+%define                apxs    /usr/sbin/apxs
+%define                mod_name        perl
+# NB! leave this without *release*
+%define        apache_test_version     1.29
 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
@@ -23,13 +29,15 @@ Summary(sv):        En inbyggd Perl-interpretator f
 Summary(uk):   íÏÄÕÌØ ×ÂÕÄÏ×Õ×ÁÎÎÑ ¦ÎÔÅÒÐÒÅÔÁÔÏÒÁ Perl × ÓÅÒ×ÅÒ Apache
 Summary(zh_CN):        ÓÃÓÚ Apache web ·þÎñ³ÌÐòµÄ Perl ½âÊͳÌÐò¡£
 Name:          apache-mod_perl
-Version:       2.0.2
-Release:       3
+%define        _rc     -rc1
+Version:       2.0.3
+Release:       0.%(echo %{_rc} | sed -e s/-//).1
 Epoch:         1
 License:       Apache
 Group:         Networking/Daemons
-Source0:       http://perl.apache.org/dist/mod_perl-%{version}.tar.gz
-# Source0-md5: ad0a509fd34e3b8452887d80a1d45dea
+#Source0:      http://perl.apache.org/dist/mod_perl-%{version}.tar.gz
+Source0:       http://people.apache.org/~pgollucci/mp2/mod_perl-%{version}%{_rc}.tar.gz
+# Source0-md5: 794dfb58f4219c76f600e8153d5cc347
 Source1:       %{name}.conf
 Patch0:                %{name}-Makefile_PL.patch
 URL:           http://perl.apache.org/
@@ -37,20 +45,17 @@ BuildRequires:      apache-devel >= 2.0.55-1
 BuildRequires: apr-util-devel >= 1:1.0.0
 BuildRequires: expat-devel
 BuildRequires: gdbm-devel
-BuildRequires: openldap-devel
+BuildRequires: openldap-devel >= 2.3.0
+BuildRequires: perl-Apache-Test >= 1:%{apache_test_version}
+%{?with_autodeps:BuildRequires:        perl-Data-Flow}
 BuildRequires: perl-devel >= 1:5.8.2
 BuildRequires: rpm-perlprov >= 3.0.3-16
-%requires_eq_to        apache apache-devel
-Provides:      apache(mod_perl)
-Provides:      mod_perl
+BuildRequires: rpmbuild(macros) >= 1.268
+# older apache-mod_perl could make bad autodeps to perl-mod_perl
+BuildConflicts:        apache-mod_perl < 1:2.0.2-9
 Requires:      apache(modules-api) = %apache_modules_api
-Requires:      perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
-# What's this mod_perl_hooks for?
-Provides:      perl(mod_perl_hooks)
-Provides:      perl-Apache-Test
-Obsoletes:     mod_perl
-Obsoletes:     mod_perl-common
-Conflicts:     perl-modules < 1:5.8.6-6
+Requires:      perl-mod_%{mod_name} = %{epoch}:%{version}-%{release}
+Provides:      apache(mod_perl)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # TODO: separate -devel with ExtUtils::Embed and friends?
@@ -188,10 +193,48 @@ Apache web 
 ½Ó¿Ú¡£ ÓÉÓÚ²»±ØÆô¶¯ÈκÎÍⲿ Perl ½âÊͳÌÐò£¬Òò´Ë»áʹ CGI
 ½Å±¾»Øת¹ý³Ì¸üΪ¿ìËÙ¡£
 
+%package devel
+Summary:       Files needed for building XS modules that use mod_perl
+Summary(pl):   Pliki potrzebne do budowania modu³ów XS korzystaj±cych z mod_perla
+Group:         Development/Libraries
+Requires:      apache-devel >= 2.0
+Requires:      perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
+Requires:      perl-Apache-Test
+Requires:      perl-mod_%{mod_name} = %{epoch}:%{version}-%{release}
+Obsoletes:     mod_perl
+Obsoletes:     mod_perl-common
+Conflicts:     perl-modules < 1:5.8.6-6
+
+%description devel
+The apache-mod_perl-devel package contains the files needed for
+building XS modules that use mod_perl.
+
+%description devel -l pl
+Ten pakiet zawiera pliki potrzebne do budowania modu³ów XS
+korzystaj±cych z mod_perla.
+
+%package -n perl-mod_%{mod_name}
+Summary:       Perl APIs for mod_perl
+Summary(pl):   Perlowe API dla mod_perla
+Group:         Development/Languages/Perl
+
+%description -n perl-mod_%{mod_name}
+Perl APIs for mod_perl.
+
+%description -n perl-mod_%{mod_name} -l pl
+Perlowe API dla mod_perla.
+
 %prep
-%setup -q -n mod_perl-%{version}
+%setup -q -n mod_%{mod_name}-%{version}%{_rc}
 %patch0 -p1
 
+bundled=$(%{__perl} -IApache-Test/lib -MApache::Test -e 'print Apache::Test->VERSION')
+if [ "%apache_test_version" != "$bundled" ]; then
+       : "%%define apache_test_version to $bundled and retry."
+       exit 1
+fi
+rm -rf Apache-Test
+
 %build
 %{__perl} Makefile.PL \
        MP_APXS=%{apxs} \
@@ -219,34 +262,31 @@ install xs/tables/current/ModPerl/* $RPM_BUILD_ROOT%{perl_vendorarch}/ModPerl
 
 rm -rf $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle
 rm -f $RPM_BUILD_ROOT%{_mandir}/man?/Bundle*
+rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
+rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/mod_perl2/.packlist
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/75_mod_perl.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-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
+%service -q httpd restart
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+       %service -q httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc Changes INSTALL README STATUS
-%attr(755,root,root) %{_pkglibdir}/*.so
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
 
+%files -n perl-mod_%{mod_name}
+%defattr(644,root,root,755)
 %{perl_vendorarch}/*.pm
 %{perl_vendorarch}/APR
-%{perl_vendorarch}/Apache
 %{perl_vendorarch}/Apache2
 %{perl_vendorarch}/ModPerl
 
@@ -259,9 +299,9 @@ fi
 %{perl_vendorarch}/auto/*/*/*.ix
 %{perl_vendorarch}/auto/*/*/*.bs
 %attr(755,root,root) %{perl_vendorarch}/auto/*/*/*.so
-
 %{perl_vendorarch}/auto/Apache2/typemap
-# to -devel? directory ownership problem...
-%{_includedir}/apache/*.h
-
 %{_mandir}/man?/*
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/apache/*.h
This page took 0.058272 seconds and 4 git commands to generate.