cubicweb.spec
author Julien Cristau <julien.cristau@logilab.fr>
Fri, 12 Feb 2016 10:39:14 +0100
changeset 11105 2a8884f3be3d
parent 11094 13c9cd75f097
child 11111 606d4fea99f5
permissions -rw-r--r--
[pkg] 3.22.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     1
%if 0%{?el5}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     2
%define python python26
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     3
%define __python /usr/bin/python2.6
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     4
%else
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     5
%define python python
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     6
%define __python /usr/bin/python
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     7
%endif
11094
13c9cd75f097 [pkg] do not include toplevel directories in rpm (closes #10362119)
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11074
diff changeset
     8
%{!?_python_sitelib: %define _python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     9
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    10
Name:           cubicweb
11105
2a8884f3be3d [pkg] 3.22.1
Julien Cristau <julien.cristau@logilab.fr>
parents: 11094
diff changeset
    11
Version:        3.22.1
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    12
Release:        logilab.1%{?dist}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    13
Summary:        CubicWeb is a semantic web application framework
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    14
Source0:        http://download.logilab.org/pub/cubicweb/cubicweb-%{version}.tar.gz
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    15
License:        LGPLv2+
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    16
Group:          Development/Languages/Python
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    17
Vendor:         Logilab <contact@logilab.fr>
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    18
Url:            http://www.cubicweb.org/project/cubicweb
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    19
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    20
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    21
BuildArch:      noarch
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    22
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    23
Requires:       %{python}
10601
73c1c9cf6bda [pkg] Add dependency on six 1.4.0
Rémi Cardona <remi.cardona@logilab.fr>
parents: 10558
diff changeset
    24
Requires:       %{python}-six >= 1.4.0
10108
129af90b2364 [devtools] Use the pause_trace context manager instead of pause_tracing/resume_tracing
Christophe de Vienne <christophe@unlish.com>
parents: 10074
diff changeset
    25
Requires:       %{python}-logilab-common >= 0.63.1
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    26
Requires:       %{python}-logilab-mtconverter >= 0.8.0
11051
de472896fc0a [pkg] 3.22.0
Julien Cristau <julien.cristau@logilab.fr>
parents: 11036
diff changeset
    27
Requires:       %{python}-rql >= 0.34.0
de472896fc0a [pkg] 3.22.0
Julien Cristau <julien.cristau@logilab.fr>
parents: 11036
diff changeset
    28
Requires:       %{python}-yams >= 0.42.0
11036
d7294e144cd2 [pkg] use correct lgdb version for tz rework
Rémi Cardona <remi.cardona@logilab.fr>
parents: 11034
diff changeset
    29
Requires:       %{python}-logilab-database >= 1.15.0
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    30
Requires:       %{python}-passlib
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    31
Requires:       %{python}-lxml
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    32
Requires:       %{python}-twisted-web
10012
8c2c6fdd8d56 [RichString] Add markdown support
Christophe de Vienne <christophe@unlish.com>
parents: 10000
diff changeset
    33
Requires:       %{python}-markdown
11074
76d06973776e [pkg] python-tz does not exist in centos should be pytz (closes #10290056)
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11051
diff changeset
    34
Requires:       pytz
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    35
# the schema view uses `dot'; at least on el5, png output requires graphviz-gd
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    36
Requires:       graphviz-gd
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    37
Requires:       gettext
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    38
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    39
BuildRequires:  %{python}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    40
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    41
%description
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    42
a repository of entities / relations for knowledge management
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    43
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    44
%prep
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    45
%setup -q
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    46
%if 0%{?el5}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    47
# change the python version in shebangs
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    48
find . -name '*.py' -type f -print0 |  xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;'
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    49
%endif
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    50
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    51
%install
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    52
NO_SETUPTOOLS=1 %{__python} setup.py --quiet install --no-compile --prefix=%{_prefix} --root="$RPM_BUILD_ROOT"
9185
499f9ddc4470 [pkg] Add log directory to rpm
Rémi Cardona <remi.cardona@logilab.fr>
parents: 9000
diff changeset
    53
mkdir -p $RPM_BUILD_ROOT/var/log/cubicweb
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    54
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    55
%clean
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    56
rm -rf $RPM_BUILD_ROOT
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    57
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    58
%files 
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    59
%defattr(-, root, root)
9185
499f9ddc4470 [pkg] Add log directory to rpm
Rémi Cardona <remi.cardona@logilab.fr>
parents: 9000
diff changeset
    60
%dir /var/log/cubicweb
11094
13c9cd75f097 [pkg] do not include toplevel directories in rpm (closes #10362119)
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11074
diff changeset
    61
%{_prefix}/share/cubicweb/*
13c9cd75f097 [pkg] do not include toplevel directories in rpm (closes #10362119)
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11074
diff changeset
    62
%{_python_sitelib}/*
13c9cd75f097 [pkg] do not include toplevel directories in rpm (closes #10362119)
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11074
diff changeset
    63
%{_bindir}/*