]> git.pld-linux.org Git - packages/apache-mod_python.git/blob - apache-mod_python.spec
- adapterized, pl translations, BuildRequires: autoconf
[packages/apache-mod_python.git] / apache-mod_python.spec
1 %define         mod_name        python
2 Summary:        A Python for the Apache Web server
3 Summary(pl):    Python dla serwera WWW Apache
4 Name:           apache-mod_%{mod_name}
5 Version:        2.7.2
6 Release:        0.1
7 License:        distributable
8 Group:          Networking/Daemons
9 Group(de):      Netzwerkwesen/Server
10 Group(pl):      Sieciowe/Serwery
11 Source0:        http://www.modpython.org/dist/mod_%{mod_name}-%{version}.tgz
12 Patch0:         apache-mod_python-shared.patch
13 Patch1:         apache-mod_python-DESTDIR.patch
14 URL:            http://www.modpython.org/
15 Requires:       apache
16 Requires:       python 
17 BuildRequires:  autoconf
18 BuildRequires:  apache
19 BuildRequires:  apache-devel
20 BuildRequires:  python-devel
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define apache_moddir  %(/usr/sbin/apxs -q LIBEXECDIR)
24 %define python_prefix  %(echo `python -c "import sys; print sys.prefix"`)
25 %define python_version %(echo `python -c "import sys; print sys.version[:3]"`)
26 %define python_libdir      %{python_prefix}/lib/python%{python_version}
27 %define python_includedir  %{python_prefix}/include/python%{python_version}
28 %define python_sitedir     %{python_libdir}/site-packages
29
30 %description
31 mod_python allows embedding Python within the Apache Web server for a
32 considerable boost in performance and added flexibility in designing
33 web based applications.
34
35 NOTE: This versions should still be considered Beta.
36
37 %description -l pl
38 mod_python pozwala na zagnie¿d¿enie pythona w serwerze WWW Apache w
39 celu zauwa¿alnej poprawy wydajno¶ci i zwiêkszonej elastyczno¶ci przy
40 tworzeniu aplikacji opartych na WWW.
41
42 Uwaga: ta wersja nadal powinna byæ uwa¿ana za Beta.
43
44 %prep 
45 %setup -q -n mod_%{mod_name}-%{version}
46 %patch0 -p1
47 %patch1 -p1
48
49 %build
50 autoconf
51 %configure --with-apxs=/usr/sbin/apxs
52 %{__make} dso
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{apache_moddir},%{python_sitedir}/mod_%{mod_name}}
57
58 %{__make} install DESTDIR=$RPM_BUILD_ROOT
59
60 gzip -9nf README COPYRIGHT NEWS CREDITS
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 /usr/sbin/apxs -e -a -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
67 if [ -f /var/lock/subsys/httpd ]; then
68         /etc/rc.d/init.d/httpd restart 1>&2
69 fi
70
71 %preun
72 if [ "$1" = "0" ]; then
73         /usr/sbin/apxs -e -A -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
74         if [ -f /var/lock/subsys/httpd ]; then
75                 /etc/rc.d/init.d/httpd restart 1>&2
76         fi
77 fi
78
79 %files
80 %defattr(644,root,root,755)
81 %doc doc/*
82 %doc {README,COPYRIGHT,NEWS,CREDITS}.gz
83 %attr(755,root,root) %{apache_moddir}/*
84 %{python_sitedir}/mod_%{mod_name}
This page took 0.039768 seconds and 4 git commands to generate.