]> git.pld-linux.org Git - packages/apache-mod_python.git/blob - apache-mod_python.spec
- use standard python macros
[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.6
6 Release:        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_eq    python
17 BuildRequires:  autoconf
18 BuildRequires:  apache
19 BuildRequires:  apache-devel
20 BuildRequires:  python-devel
21 BuildRequires:  rpm-pythonprov
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define apache_moddir  %(/usr/sbin/apxs -q LIBEXECDIR)
25
26 %include /usr/lib/rpm/macros.python
27
28 %description
29 mod_python allows embedding Python within the Apache Web server for a
30 considerable boost in performance and added flexibility in designing
31 web based applications.
32
33 NOTE: This versions should still be considered Beta.
34
35 %description -l pl
36 mod_python pozwala na zagnie¿d¿enie pythona w serwerze WWW Apache w
37 celu zauwa¿alnej poprawy wydajno¶ci i zwiêkszonej elastyczno¶ci przy
38 tworzeniu aplikacji opartych na WWW.
39
40 Uwaga: ta wersja nadal powinna byæ uwa¿ana za Beta.
41
42 %prep 
43 %setup -q -n mod_%{mod_name}-%{version}
44 %patch0 -p1
45 %patch1 -p1
46
47 %build
48 autoconf
49 %configure --with-apxs=/usr/sbin/apxs
50 %{__make} dso
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{apache_moddir},%{py_sitedir}/mod_%{mod_name}}
55
56 %{__make} install DESTDIR=$RPM_BUILD_ROOT
57
58 gzip -9nf README COPYRIGHT NEWS CREDITS
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %post
64 /usr/sbin/apxs -e -a -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
65 if [ -f /var/lock/subsys/httpd ]; then
66         /etc/rc.d/init.d/httpd restart 1>&2
67 fi
68
69 %preun
70 if [ "$1" = "0" ]; then
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 fi
76
77 %files
78 %defattr(644,root,root,755)
79 %doc doc/*
80 %doc {README,COPYRIGHT,NEWS,CREDITS}.gz
81 %attr(755,root,root) %{apache_moddir}/*
82 %{py_sitedir}/mod_%{mod_name}
This page took 0.249969 seconds and 3 git commands to generate.