]> git.pld-linux.org Git - packages/apache-mod_python.git/blob - apache-mod_python.spec
809ea872f8385d850ba69fdc85953b71408a05c0
[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:  apache
21 BuildRequires:  apache-devel
22 BuildRequires:  python-devel >= 2.2
23 BuildRequires:  rpm-pythonprov
24 Requires:       apache
25 %requires_eq    python
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         apache_moddir   %(/usr/sbin/apxs -q LIBEXECDIR)
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
52 # new apache needs it
53 CFLAGS="-DEAPI %{rpmcflags}"
54 %configure \
55         --with-apxs=/usr/sbin/apxs
56  
57 %{__make} dso
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{apache_moddir},%{py_sitedir}/mod_%{mod_name}}
62
63 %{__make} install DESTDIR=$RPM_BUILD_ROOT
64
65 gzip -9nf README COPYRIGHT NEWS CREDITS
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 /usr/sbin/apxs -e -a -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
72 if [ -f /var/lock/subsys/httpd ]; then
73         /etc/rc.d/init.d/httpd restart 1>&2
74 fi
75
76 %preun
77 if [ "$1" = "0" ]; then
78         /usr/sbin/apxs -e -A -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
79         if [ -f /var/lock/subsys/httpd ]; then
80                 /etc/rc.d/init.d/httpd restart 1>&2
81         fi
82 fi
83
84 %files
85 %defattr(644,root,root,755)
86 %doc doc-html/*
87 %doc {README,COPYRIGHT,NEWS,CREDITS}.gz
88 %attr(755,root,root) %{apache_moddir}/*
89 %{py_sitedir}/mod_%{mod_name}
This page took 0.037013 seconds and 3 git commands to generate.