]> git.pld-linux.org Git - packages/apache-mod_python.git/blobdiff - apache-mod_python.spec
- added aclocal
[packages/apache-mod_python.git] / apache-mod_python.spec
index bd70c10e8d5ac6d292ffea4262d0abf5cdb90589..aa634897f55655e571af67531bf02827681f049b 100644 (file)
@@ -1,59 +1,69 @@
+%include       /usr/lib/rpm/macros.python
 %define                mod_name        python
 Summary:       A Python for the Apache Web server
+Summary(pl):   Python dla serwera WWW Apache
 Name:          apache-mod_%{mod_name}
-Version:       2.1
-Release:       1
+Version:       2.7.6
+Release:       4
 License:       distributable
 Group:         Networking/Daemons
+Group(de):     Netzwerkwesen/Server
+Group(es):     Red/Servidores
+Group(fr):     Réseau/Serveurs
 Group(pl):     Sieciowe/Serwery
-Source:                http://www.modpython.org/dist/mod_%{mod_name}-%{version}.tgz
+Group(pt):     Rede/Server
+Source0:       http://www.modpython.org/dist/mod_%{mod_name}-%{version}.tgz
+Patch0:                apache-mod_python-shared.patch
+Patch1:                apache-mod_python-DESTDIR.patch
 URL:           http://www.modpython.org/
-Requires:      apache
-Requires:      python 
+BuildRequires: autoconf
+BuildRequires: automake
 BuildRequires: apache
 BuildRequires: apache-devel
-BuildRequires: python-devel
+BuildRequires: python-devel >= 2.2
+BuildRequires: rpm-pythonprov
+Requires:      apache
+%requires_eq   python
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define        apache_moddir  %(/usr/sbin/apxs -q LIBEXECDIR)
-%define python_prefix  %(echo `python -c "import sys; print sys.prefix"`)
-%define python_version %(echo `python -c "import sys; print sys.version[:3]"`)
-%define python_libdir      %{python_prefix}/lib/python%{python_version}
-%define python_includedir  %{python_prefix}/include/python%{python_version}
-%define python_sitedir     %{python_libdir}/site-packages
-
+%define                apache_moddir   %(/usr/sbin/apxs -q LIBEXECDIR)
 
 %description
-mod_python allows embedding Python within the Apache Web server 
-for a considerable boost in performance and added flexibility 
-in designing web based applications. 
+mod_python allows embedding Python within the Apache Web server for a
+considerable boost in performance and added flexibility in designing
+web based applications.
 
-NOTE: This versions should still be considered Beta
+%description -l pl
+mod_python pozwala na zagnie¿d¿enie pythona w serwerze WWW Apache w
+celu zauwa¿alnej poprawy wydajno¶ci i zwiêkszonej elastyczno¶ci przy
+tworzeniu aplikacji opartych na WWW.
 
 %prep 
 %setup -q -n mod_%{mod_name}-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
-python %{python_libdir}/compileall.py lib/python/mod_python/
+aclocal
+autoconf
 
-PTHREADS=
-if ldd %{python_prefix}/bin/python | grep libpthread >/dev/null; then 
-        PTHREADS=-lpthread
-fi   
-cd src
-/usr/sbin/apxs -I%{python_includedir} -lpython $PTHREADS -o mod_%{mod_name}.so -c mod_%{mod_name}.c
-cd ..
-gzip -9nf README COPYRIGHT
+# new apache needs it
+CFLAGS="-DEAPI %{rpmcflags}"
+%configure \
+       --with-apxs=/usr/sbin/apxs
+%{__make} dso
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{apache_moddir},%{py_sitedir}/mod_%{mod_name}}
 
-install -d $RPM_BUILD_ROOT%{apache_moddir}
-install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{apache_moddir}
-strip --strip-unneeded $RPM_BUILD_ROOT%{apache_moddir}/* 
+%{__make} install DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{python_sitedir}/mod_%{mod_name}
-install lib/python/mod_python/* $RPM_BUILD_ROOT%{python_sitedir}/mod_%{mod_name}
+gzip -9nf README COPYRIGHT NEWS CREDITS
+
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
 /usr/sbin/apxs -e -a -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
@@ -69,12 +79,9 @@ if [ "$1" = "0" ]; then
        fi
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
+%doc doc-html/*
+%doc {README,COPYRIGHT,NEWS,CREDITS}.gz
 %attr(755,root,root) %{apache_moddir}/*
-%{python_sitedir}/mod_%{mod_name}
-%doc doc/*
-%doc {README,COPYRIGHT}.gz
+%{py_sitedir}/mod_%{mod_name}
This page took 0.053228 seconds and 4 git commands to generate.