-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathautocloud.spec
150 lines (117 loc) · 4.57 KB
/
autocloud.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
%global modname autocloud
%global commit0 415c74f8df1cdebbf25034bd0218d34faf466d24
%global gittag0 GIT-TAG
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Name: autocloud
Version: 0.1
Release: 4%{?dist}
Summary: A test framework to test Fedora cloud images
Group: Applications/Internet
License: GPLv3
URL: http://github.com/kushaldas/autocloud
Source0: https://github.com/kushaldas/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: fedmsg
BuildRequires: python-sqlalchemy
BuildRequires: python-redis
BuildRequires: python-retask
BuildRequires: python-sqlalchemy-utils
BuildRequires: python-flask
BuildRequires: systemd
%description
A test framework which automatically downloads and tests Fedora cloud image
builds from koji.
%package common
Summary: autocloud common library
Requires: python-psycopg2
%description common
This package contains the common libraries required by other autocloud
components.
%package web
Summary: Autocloud web interface
Requires: %{name}-common = %{version}-%{release}
Requires: python-flask
Requires: python-flask-restless
Requires: httpd
Requires: mod_wsgi
%description web
This package is for web interface for autocloud.
%package backend
Summary: autocloud backend
Requires: %{name}-common = %{version}-%{release}
Requires: fedmsg-hub
Requires: tunir
Requires: python-sqlalchemy
Requires: python-redis
Requires: python-retask
Requires: python-sqlalchemy-utils
Requires: redis
Requires: fedmsg
Requires: koji
%description backend
This runs a daemon which keeps listening to fedmsg and dispatches messages
to autocloud service for process images.
%prep
%setup -q -n %{name}-%{commit0}
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build \
--install-data=%{_datadir} --root %{buildroot}
%{__mkdir_p} %{buildroot}%{_sysconfdir}/fedmsg.d/
%{__cp} fedmsg.d/autocloud.py %{buildroot}%{_sysconfdir}/fedmsg.d/.
%{__cp} fedmsg.d/endpoints-autocloud.py %{buildroot}%{_sysconfdir}/fedmsg.d/.
%{__mkdir_p} %{buildroot}%{_datadir}/%{modname}/
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/httpd/conf.d
install -m 644 apache/%{modname}.wsgi %{buildroot}%{_datadir}/%{modname}/%{modname}.wsgi
install -m 644 apache/%{modname}.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/%{modname}.conf
install -m 644 autocloud_job.py %{buildroot}%{_datadir}/%{modname}/autocloud_job.py
install -m 644 createdb.py %{buildroot}%{_datadir}/%{modname}/createdb.py
mv autocloud/web/static/ %{buildroot}%{_datadir}/%{modname}
%{__mkdir_p} %{buildroot}%{_sbindir}
install -m 755 autocloud_job %{buildroot}%{_sbindir}/autocloud_job
mkdir -p %{buildroot}%{_sysconfdir}/%{modname}/
install -m 644 config/%{modname}.cfg %{buildroot}%{_sysconfdir}/%{modname}/%{modname}.cfg
%{__mkdir_p} %{buildroot}%{_unitdir}
%{__install} -pm644 autocloud.service \
%{buildroot}%{_unitdir}/autocloud.service
rm -rf %{buildroot}%{_datadir}/%{modname}/static/bootstrap
%files common
%doc README.md
%license LICENSE
%dir %{python_sitelib}/%{modname}/
%dir %{_sysconfdir}/%{modname}/
%dir %{_datadir}/%{modname}
%{python_sitelib}/%{modname}/__init__.py*
%{python_sitelib}/%{modname}/models.py*
%{python_sitelib}/%{modname}/utils/*
%{python_sitelib}/%{modname}-%{version}-py%{pyver}.egg-info/
%config(noreplace) %{_sysconfdir}/fedmsg.d/autocloud.py*
%config(noreplace) %{_sysconfdir}/fedmsg.d/endpoints-autocloud.py*
%config(noreplace) %{_sysconfdir}/%{modname}/%{modname}.cfg
%{_datadir}/%{modname}/createdb.py*
%files web
%{python_sitelib}/%{modname}/web/*
%{_datadir}/%{modname}/%{modname}.wsgi
%{_datadir}/%{modname}/static/*
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{modname}.conf
%files backend
%{python_sitelib}/%{modname}/consumer.py*
%{python_sitelib}/%{modname}/producer.py*
%{_datadir}/%{modname}/autocloud_job.py*
%{_sbindir}/autocloud_job
%{_unitdir}/autocloud.service
%changelog
* Wed Sep 23 2015 Praveen Kumar <[email protected]> 0.1-4
- Add createdb to proper location
- Remove db creation during rpmbuild
* Wed Sep 23 2015 Kushal Das <[email protected]> - 0.1-3
- Fixes dependencies
* Tue Sep 22 2015 Ratnadeep Debnath <[email protected]> - 0.1-2
- Updating SPEC based on suggestions from review request.
* Mon Aug 31 2015 Ratnadeep Debnath <[email protected]> - 0.1-1
- Initial packaging.