forked from Villaz/vcycle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvcycle.spec
52 lines (43 loc) · 1.03 KB
/
vcycle.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
Name: vcycle
Version: %(echo ${VCYCLE_VERSION:-0.0})
Release: 1
BuildArch: noarch
Summary: Vcycle daemon and tools
License: BSD
Group: System Environment/Daemons
Source: vcycle.tgz
URL: http://www.gridpp.ac.uk/vac/
Vendor: GridPP
Packager: Andrew McNab <[email protected]>
Requires: httpd,mod_ssl,python-novaclient
%description
VM lifecycle manager daemon for OpenStack etc
%prep
%setup -n vcycle
%build
%install
make install
mkdir -p $RPM_BUILD_ROOT/usr/sbin
# we are rpm so we can put files in /usr/sbin etc too
cp -f $RPM_BUILD_ROOT/var/lib/vcycle/bin/vcycle $RPM_BUILD_ROOT/usr/sbin
%preun
if [ "$1" = "0" ] ; then
# if uninstallation rather than upgrade then stop
service vcycled stop
fi
%post
service vcycled status
if [ $? = 0 ] ; then
# if already running then restart with new version
service vcycled restart
fi
%files
/usr/sbin/vcycle
/var/lib/vcycle/bin
/var/lib/vcycle/doc
/var/lib/vcycle/tmp
/var/lib/vcycle/user_data
/var/lib/vcycle/machines
/var/lib/vcycle/machineoutputs
/etc/rc.d/init.d/vcycled
/etc/logrotate.d/vcycled