Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigigraph / pkg / vigigraph.redhat.spec @ 7061ecbf

History | View | Annotate | Download (2.12 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:    @RELEASE@%{?dist}
13
Source0:    %{name}-%{version}.tar.gz
14
URL:        @URL@
15
Group:      Applications/System
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:   python26-mod_wsgi
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

    
35
%build
36

    
37
%install
38
rm -rf $RPM_BUILD_ROOT
39
make install_pkg \
40
    DESTDIR=$RPM_BUILD_ROOT \
41
    SYSCONFDIR=%{_sysconfdir} \
42
    LOCALSTATEDIR=%{_localstatedir} \
43
    PYTHON=%{__python}
44

    
45
# Pour marquer en %ghost
46
touch $RPM_BUILD_ROOT%{python_sitelib}/%{module}/app_cfg.py{c,o}
47

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

    
50

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

    
54
%clean
55
rm -rf $RPM_BUILD_ROOT
56

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