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