summaryrefslogtreecommitdiff
path: root/packages/brpm.tmpl
blob: f0c874ee7af5c292f73e53f9caba8aca0aedcbb3 (plain)
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
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           cloud-init
Version:        {{version}}
Release:        {{release}}%{?dist}
Summary:        Cloud instance init scripts

Group:          System Environment/Base
License:        GPLv3
URL:            http://launchpad.net/cloud-init

Source0:        {{archive_name}}

BuildArch:      noarch

BuildRoot:      %{_tmppath}


{{for r in bd_requires}}
BuildRequires: {{r}}
{{endfor}}

# Install requirements
{{for r in requires}}
Requires: {{r}}
{{endfor}}

%description
Cloud-init is a set of init scripts for cloud instances.  Cloud instances
need special scripts to run during initialization to retrieve and install
ssh keys and to let the user run various scripts.


%prep
%setup -q -n %{name}-%{version}-{{revno}}

%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files

# Docs
{{for r in docs}}
%doc {{r}}
{{endfor}}

# Configs
{{for r in configs}}
%config(noreplace) %{_sysconfdir}/{{r}}
{{endfor}}

# Other files
{{for r in files}}
{{r}}
{{endfor}}

# Python sitelib
%{python_sitelib}/*

%changelog

{{changelog}}