]> git.pld-linux.org Git - packages/apache-mod_python.git/blame - apache-mod_python.spec
use shared libpython
[packages/apache-mod_python.git] / apache-mod_python.spec
CommitLineData
9da631b3 1%define mod_name python
2Summary: A Python for the Apache Web server
3Name: apache-mod_%{mod_name}
213b00d4
AF
4Version: 2.7.2
5Release: 0.1
9da631b3 6License: distributable
7Group: Networking/Daemons
8Group(pl): Sieciowe/Serwery
9Source: http://www.modpython.org/dist/mod_%{mod_name}-%{version}.tgz
f7564150
AF
10Patch0: apache-mod_python-shared.patch
11Patch1: apache-mod_python-DESTDIR.patch
9da631b3 12URL: http://www.modpython.org/
13Requires: apache
14Requires: python
15BuildRequires: apache
16BuildRequires: apache-devel
17BuildRequires: python-devel
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%define apache_moddir %(/usr/sbin/apxs -q LIBEXECDIR)
21%define python_prefix %(echo `python -c "import sys; print sys.prefix"`)
22%define python_version %(echo `python -c "import sys; print sys.version[:3]"`)
23%define python_libdir %{python_prefix}/lib/python%{python_version}
24%define python_includedir %{python_prefix}/include/python%{python_version}
25%define python_sitedir %{python_libdir}/site-packages
26
9da631b3 27%description
28mod_python allows embedding Python within the Apache Web server
29for a considerable boost in performance and added flexibility
30in designing web based applications.
31
32NOTE: This versions should still be considered Beta
33
34%prep
35%setup -q -n mod_%{mod_name}-%{version}
f7564150
AF
36%patch0 -p1
37%patch1 -p1
9da631b3 38
39%build
f7564150
AF
40autoconf
41%{configure} --with-apxs=/usr/sbin/apxs
42%{__make} dso
9da631b3 43
44%install
45rm -rf $RPM_BUILD_ROOT
c55db4a1 46install -d $RPM_BUILD_ROOT{%{apache_moddir},%{python_sitedir}/mod_%{mod_name}}
9da631b3 47
f7564150 48%{__make} install DESTDIR=$RPM_BUILD_ROOT
c55db4a1 49
f7564150 50gzip -9nf README COPYRIGHT NEWS CREDITS
9da631b3 51
52%post
53/usr/sbin/apxs -e -a -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
54if [ -f /var/lock/subsys/httpd ]; then
55 /etc/rc.d/init.d/httpd restart 1>&2
56fi
57
58%preun
59if [ "$1" = "0" ]; then
60 /usr/sbin/apxs -e -A -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
61 if [ -f /var/lock/subsys/httpd ]; then
62 /etc/rc.d/init.d/httpd restart 1>&2
63 fi
64fi
65
66%clean
67rm -rf $RPM_BUILD_ROOT
68
69%files
70%defattr(644,root,root,755)
9da631b3 71%doc doc/*
6b4a8436 72%doc {README,COPYRIGHT,NEWS,CREDITS}.gz
c55db4a1 73%attr(755,root,root) %{apache_moddir}/*
74%{python_sitedir}/mod_%{mod_name}
This page took 0.084474 seconds and 4 git commands to generate.