-
Notifications
You must be signed in to change notification settings - Fork 0
/
euca2ools.spec
158 lines (139 loc) · 4.44 KB
/
euca2ools.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
151
152
153
154
155
156
157
%global is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
%global is_centos %(grep CentOS /etc/redhat-release > /dev/null && echo 1 || echo 0)
%global is_fedora %(grep Fedora /etc/redhat-release > /dev/null && echo 1 || echo 0)
%global euca_docdir /usr/share/doc
%global euca_python python
%global euca_where lib/python2.6/site-packages
%global build_m2crypto 0
%ifarch x86_64
%global euca_libarch lib64
%else
%global euca_libarch lib
%endif
%if %is_fedora
%global build_m2crypto 0
%endif
%if %is_suse
%global euca_whereM2C %{euca_libarch}/python2.6/site-packages
%global euca_docdir /usr/share/doc/packages
%global build_m2crypto 1
%endif
%if %is_centos
%global euca_python python2.5
%global euca_where lib/python2.5/site-packages
%global euca_whereM2C %{euca_libarch}/python2.5/site-packages
%global build_m2crypto 1
%endif
Summary: Elastic Utility Computing Architecture Command Line Tools
Name: euca2ools
Version: 1.3
Release: 1
License: BSD
Group: Applications/System
%if %is_fedora
BuildRequires: gcc, make, swig, python-devel, python
Requires: swig, python, m2crypto
%endif
%if %is_suse
BuildRequires: gcc, make, swig, python-devel, python
Requires: swig, python
%endif
%if %is_centos
BuildRequires: gcc, make, swig, python25-devel, python25
Requires: swig, python25
%endif
Vendor: Eucalyptus Systems
#Icon: someicon.xpm
Source: http://eucalyptussoftware.com/downloads/releases/euca2ools-%{version}.tar.gz
URL: http://open.eucalyptus.com
%description
EUCALYPTUS is an open source service overlay that implements elastic
computing using existing resources. The goal of EUCALYPTUS is to allow
sites with existing clusters and server infrastructure to co-host an
elastic computing service that is interface-compatible with Amazon's EC2.
This package contains the command line tools to interact with Eucalyptus.
This tools are complatible with Amazon EC2.
%prep
%setup -n euca2ools-%{version}
%if %build_m2crypto
tar xzf deps/M2Crypto*tar.gz
%endif
tar xzf deps/boto-*tar.gz
%build
export DESTDIR=$RPM_BUILD_ROOT
%if %build_m2crypto
cd M2Crypto*
%{euca_python} setup.py build
cd ..
%endif
cd boto*
%{euca_python} setup.py build
cd ../euca2ools
%{euca_python} setup.py build
%if %is_centos
cd ..
for x in `/bin/ls bin/euca-*`; do
sed --in-place 's:#!/usr/bin/python:#!/usr/bin/env python2.5:' $x
done
%endif
%install
export DESTDIR=$RPM_BUILD_ROOT
%if %build_m2crypto
cd M2Crypto-*
%{euca_python} setup.py install --prefix=$DESTDIR/usr
cd ..
%endif
cd boto-*
%{euca_python} setup.py install --prefix=$DESTDIR/usr
cd ../euca2ools
%{euca_python} setup.py install --prefix=$DESTDIR/usr
cd ..
install -o root -m 755 -d $DESTDIR/usr/bin
install -o root -m 755 -d $DESTDIR/usr/man/man1
install -o root -m 755 -d $DESTDIR/%{euca_docdir}/euca2ools-%{version}
install -o root -m 755 bin/* $DESTDIR/usr/bin
install -o root -m 644 man/* $DESTDIR/usr/man/man1
install -o root -m 755 INSTALL COPYING README $DESTDIR/%{euca_docdir}/euca2ools-%{version}
%clean
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
#export DESTDIR=$RPM_BUILD_ROOT
#rm -rf $RPM_BUILD_DIR/euca2ools-%{version}
#rm -rf $DESTDIR/%{euca_docdir}/euca2ools-%{version}
#rm -rf $DESTDIR/usr/%euca_whereM2C/M2Crypto
#rm -rf $DESTDIR/usr/%euca_whereM2C/M2Crypto*egg-info
#rm -rf $DESTDIR/usr/%euca_where/boto
#rm -rf $DESTDIR/usr/%euca_where/boto*egg-info
#rm -rf $DESTDIR/usr/%euca_where/euca2ools
#rm -rf $DESTDIR/usr/%euca_where/euca2ools*egg-info
#rm -rf $DESTDIR/usr/bin/euca-* $DESTDIR/usr/bin/s3put $DESTDIR/usr/bin/sdbadmin
#rm -rf $DESTDIR/usr/man/man1/euca-*
%files
/usr/bin/s3put
/usr/bin/sdbadmin
/usr/bin/elbadmin
/usr/bin/fetch_file
/usr/bin/launch_instance
/usr/bin/list_instances
/usr/bin/taskadmin
/usr/bin/euca-*
/usr/man/man1/euca*
%if %build_m2crypto
/usr/%euca_whereM2C/M2Crypto
/usr/%euca_whereM2C/M2Crypto*egg-info
%endif
/usr/%euca_where/boto
/usr/%euca_where/boto*egg-info
/usr/%euca_where/euca2ools
/usr/%euca_where/euca2ools*egg-info
%{euca_docdir}/euca2ools-%{version}
%changelog
* Wed Aug 18 2010 Eucalyptus Systems <[email protected]>
- Don't build m2crypto on fedora
* Wed Mar 17 2010 Eucalyptus Systems <[email protected]>
- Added support for fedora
* Fri Feb 12 2010 Eucalyptus Systems <[email protected]>
- Version 1.2
* Sun Nov 1 2009 Eucalyptus Systems <[email protected]>
- Version 1.1
* Sat Jun 27 2009 Eucalyptus Systems<([email protected]>
- First public release.