cubicweb.spec
author Denis Laxalde <denis.laxalde@logilab.fr>
Mon, 14 Mar 2016 15:38:03 +0100
changeset 11184 2a7b98d91736
parent 11149 1b93ff37755b
child 11198 10c12f31d0fe
permissions -rw-r--r--
[testlib] Import nocoverage from logilab.common.testlib This depends on a change in logilab-common 1.2.0
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
11111
606d4fea99f5 [pkg] Attempt to fix rhel6 build
Julien Cristau <julien.cristau@logilab.fr>
parents: 11105
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
11149
1b93ff37755b [pkg] 3.22.2
Julien Cristau <julien.cristau@logilab.fr>
parents: 11148
diff changeset
    11
Version:        3.22.2
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
11134
fd905f9aaace [pkg] use https URLs to pypi.{python.org,debian.net}
Julien Cristau <julien.cristau@logilab.fr>
parents: 11133
diff changeset
    14
Source0:        https://pypi.python.org/packages/source/c/cubicweb/cubicweb-%{version}.tar.gz
8873
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>
11133
9e955d8be8a9 [pkg] use https URL for www.cubicweb.org
Julien Cristau <julien.cristau@logilab.fr>
parents: 11127
diff changeset
    18
Url:            https://www.cubicweb.org/project/cubicweb
8873
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
11184
2a7b98d91736 [testlib] Import nocoverage from logilab.common.testlib
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11149
diff changeset
    25
Requires:       %{python}-logilab-common >= 1.2.0
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
11148
244e30f18720 [pkg] fix centos install
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11134
diff changeset
    61
%{_prefix}/share/cubicweb/*
244e30f18720 [pkg] fix centos install
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11134
diff changeset
    62
%{python_sitelib}/*
244e30f18720 [pkg] fix centos install
Samuel Trégouët <samuel.tregouet@logilab.fr>
parents: 11134
diff changeset
    63
%{_bindir}/*