-
Notifications
You must be signed in to change notification settings - Fork 21
/
foo.spec
84 lines (62 loc) · 1.87 KB
/
foo.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Macros for py2/py3 compatibility
%if 0%{?fedora} || 0%{?rhel} > 7
%global pyver 3
%else
%global pyver 2
%endif
%global pyver_bin python%{pyver}
%global pyver_sitelib %{expand:%{python%{pyver}_sitelib}}
%global pyver_install %{expand:%{py%{pyver}_install}}
%global pyver_build %{expand:%{py%{pyver}_build}}
# End of macros for py2/py3 compatibility
Name: foo
Epoch: 2077
Version: 1.2.3
Release: 42%{?dist}
Summary: Some package, dude
Group: Development/Languages
License: ASL 2.0
URL: http://notreallyavaliddomain.name/foo
BuildArch: noarch
Source0: %{name}/%{name}-%{version}.tar.gz
Patch0001: 0001-something.patch
Patch0002: 0002-something-else.patch
BuildRequires: python-setuptools
BuildRequires: python2-devel
%if %{pyver} == 2
BuildRequires: PyYAML
BuildRequires: pytz
%else
BuildRequires: python%{pyver}-PyYAML
BuildRequires: python%{pyver}-pytz
%endif
Requires: python-argparse
Requires: python-iso8601
Requires: python-prettytable
Requires: python-sqlalchemy >= 1.0.10
Requires(pre): shadow-utils
%description
This is foo! This is foo! This is foo! This is foo! This is foo! This is foo!
This is foo! This is foo! This is foo!
%setup -q
%prep
%setup -q
%patch0001 -p1
%patch0002 -p1
# We provide version like this in order to remove runtime dep on pbr.
sed -i s/REDHATNOVACLIENTVERSION/%{version}/ novaclient/__init__.py
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%files
%doc README.rst
%{_bindir}/foo
# hardcoded library path
/usr/lib/share/foo
%changelog
* Mon Apr 07 2014 Jakub Ruzicka <jruzicka@redhat.com> 1.2.3-42
- Update to upstream 1.2.3
- Oh no, there's a %macro in changelog
* Tue Mar 25 2014 Jakub Ruzicka <jruzicka@redhat.com> 1.2.2-1
- Update to upstream 1.2.2