Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigigraph / pkg / vigigraph.redhat.spec @ 7f07168b

History | View | Annotate | Download (2.07 KB)

1
%define module  @SHORT_NAME@
2

    
3
%define pyver 26
4
%define pybasever 2.6
5
%define __python /usr/bin/python%{pybasever}
6
%define __os_install_post %{__python26_os_install_post}
7
%{!?python26_sitelib: %define python26_sitelib %(python26 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
8

    
9
Name:       vigilo-%{module}
10
Summary:    @SUMMARY@
11
Version:    @VERSION@
12
Release:    1%{?svn}%{?dist}
13
Source0:    %{name}-%{version}.tar.gz
14
URL:        @URL@
15
Group:      System/Servers
16
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-build
17
License:    GPLv2
18
Buildarch:  noarch
19

    
20
BuildRequires:   python26-distribute
21
BuildRequires:   python26-babel
22

    
23
Requires:   python26-distribute
24
Requires:   vigilo-turbogears
25
Requires:   mod_wsgi-python26
26

    
27

    
28
%description
29
@DESCRIPTION@
30
This application is part of the Vigilo Project <http://vigilo-project.org>
31

    
32
%prep
33
%setup -q
34
# A cause des permissions sur /var/log/httpd sur Red Hat
35
sed -i -e '/<IfModule mod_wsgi\.c>/a WSGISocketPrefix run/wsgi' deployment/%{module}.conf
36

    
37
%build
38
make PYTHON=%{__python} SYSCONFDIR=%{_sysconfdir}
39

    
40
%install
41
rm -rf $RPM_BUILD_ROOT
42
make install \
43
	DESTDIR=$RPM_BUILD_ROOT \
44
	SYSCONFDIR=%{_sysconfdir} \
45
	PYTHON=%{__python}
46

    
47
# %find_lang %{name} # ne fonctionne qu'avec les fichiers dans /usr/share/locale/
48

    
49

    
50
%post
51
/sbin/service httpd condrestart > /dev/null 2>&1 || :
52

    
53
%clean
54
rm -rf $RPM_BUILD_ROOT
55

    
56
%files
57
%defattr(644,root,root,755)
58
%doc COPYING
59
%dir %{_sysconfdir}/vigilo
60
%dir %{_sysconfdir}/vigilo/%{module}
61
%config(noreplace) %{_sysconfdir}/vigilo/%{module}/*.conf
62
%config(noreplace) %{_sysconfdir}/vigilo/%{module}/*.py
63
%config(noreplace) %{_sysconfdir}/vigilo/%{module}/*.wsgi
64
%config(noreplace) %attr(640,root,apache) %{_sysconfdir}/vigilo/%{module}/*.ini
65
%ghost %{_sysconfdir}/vigilo/%{module}/*.pyo
66
%ghost %{_sysconfdir}/vigilo/%{module}/*.pyc
67
%{_sysconfdir}/httpd/conf.d/%{module}.conf
68
%dir %{_localstatedir}/log/vigilo/
69
%attr(750,apache,apache) %{_localstatedir}/log/vigilo/%{module}
70
%config(noreplace) %{_sysconfdir}/logrotate.d/%{module}
71
%attr(750,apache,apache) %{_localstatedir}/cache/vigilo/sessions
72
%{python26_sitelib}/*
73