cubicweb-mailinglist.spec

Sun, 29 Mar 2020 06:04:36 +0000

author
Nsukami Patrick <ptrck at nskm dot xyz>
date
Sun, 29 Mar 2020 06:04:36 +0000
changeset 106
b315b6313793
parent 93
c69c1b98f203
permissions
-rw-r--r--

[flake8] fix F401 imported but unused

79
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
1 # for el5, force use of python2.6
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
2 %if 0%{?el5}
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
3 %define python python26
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
4 %define __python /usr/bin/python2.6
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
5 %else
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
6 %define python python
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
7 %define __python /usr/bin/python
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
8 %endif
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
9 %{!?_python_sitelib: %define _python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
10
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
11 Name: cubicweb-mailinglist
93
c69c1b98f203 [pkg] 1.7.3
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 91
diff changeset
12 Version: 1.7.3
79
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
13 Release: logilab.1%{?dist}
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
14 Summary: mailing-list component for the CubicWeb framework
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
15 Group: Applications/Internet
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
16 License: LGPL
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
17 Source0: cubicweb-mailinglist-%{version}.tar.gz
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
18
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
19 BuildArch: noarch
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
21
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
22 BuildRequires: %{python} %{python}-setuptools
91
0cd46ce57189 [pkg] depend on cubicweb 3.19
Julien Cristau <julien.cristau@logilab.fr>
parents: 86
diff changeset
23 Requires: cubicweb >= 3.19.0
79
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
24
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
25 %description
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
26 mailing-list component for the CubicWeb framework
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
27
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
28 %prep
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
29 %setup -q -n cubicweb-mailinglist-%{version}
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
30 %if 0%{?el5}
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
31 # change the python version in shebangs
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
32 find . -name '*.py' -type f -print0 | xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;'
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
33 %endif
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
34
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
35 %install
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
36 NO_SETUPTOOLS=1 %{__python} setup.py --quiet install --no-compile --prefix=%{_prefix} --root="$RPM_BUILD_ROOT"
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
37 # remove generated .egg-info file
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
38 rm -rf $RPM_BUILD_ROOT/usr/lib/python*
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
39
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
40
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
41 %clean
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
42 rm -rf $RPM_BUILD_ROOT
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
43
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
44 %files
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
45 %defattr(-, root, root)
f5b8d15898f8 [packaging] add spec file for centos
Florent Cayre <florent.cayre@logilab.fr>
parents:
diff changeset
46 /*

mercurial