]> git.pld-linux.org Git - packages/ganeti.git/blob - ganeti.spec
- raw, from template
[packages/ganeti.git] / ganeti.spec
1 Summary:        Cluster-based virtualization management software
2 Name:           ganeti
3 Version:        2.6.2
4 Release:        0.1
5 License:        GPL v2
6 Group:          Applications/System
7 Source0:        https://ganeti.googlecode.com/files/%{name}-%{version}.tar.gz
8 # Source0-md5:  9d9a0c5c0341d5775988961449f82b99
9 URL:            https://code.google.com/p/ganeti/
10 BuildRequires:  fakeroot
11 BuildRequires:  gawk
12 BuildRequires:  ghc
13 BuildRequires:  ghc-QuickCheck
14 BuildRequires:  ghc-curl
15 BuildRequires:  ghc-haskell-platform
16 BuildRequires:  ghc-json
17 BuildRequires:  hlint
18 BuildRequires:  hscolour
19 BuildRequires:  python
20 BuildRequires:  python-affinity
21 BuildRequires:  python-modules
22 BuildRequires:  python-paramiko
23 BuildRequires:  python-pycurl
24 BuildRequires:  python-pyinotify
25 BuildRequires:  python-pyparsing
26 BuildRequires:  python-simplejson
27 %if %{with initscript}
28 BuildRequires:  rpmbuild(macros) >= 1.228
29 Requires(post,preun):   /sbin/chkconfig
30 Requires:       rc-scripts
31 %endif
32 %if %{with systemd_service}
33 BuildRequires:  rpmbuild(macros) >= 1.647
34 Requires(post,preun,postun):    systemd-units >= 38
35 Requires:       systemd-units >= 0.38
36 %endif
37 #BuildRequires: -
38 #BuildRequires: autoconf
39 #BuildRequires: automake
40 #BuildRequires: intltool
41 #BuildRequires: libtool
42 #Requires(postun):      -
43 #Requires(pre,post):    -
44 #Requires(preun):       -
45 #Requires:      -
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Ganeti is a cluster virtual server management software tool built on
50 top of existing virtualization technologies such as Xen or KVM and
51 other Open Source software.
52
53 %package subpackage
54 Summary:        -
55 Summary(pl.UTF-8):      -
56 Group:          -
57 # noarch subpackages only when building with rpm5
58 %if "%{_rpmversion}" >= "5"
59 BuildArch:      noarch
60 %endif
61
62 %description subpackage
63
64 %description subpackage -l pl.UTF-8
65
66 %package libs
67 Summary:        -
68 Summary(pl.UTF-8):      -
69 Group:          Libraries
70
71 %description libs
72
73 %description libs -l pl.UTF-8
74
75 %package devel
76 Summary:        Header files for %{name} library
77 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki %{name}
78 Group:          Development/Libraries
79 # if base package contains shared library for which these headers are
80 #Requires:      %{name} = %{version}-%{release}
81 # if -libs package contains shared library for which these headers are
82 #Requires:      %{name}-libs = %{version}-%{release}
83
84 %description devel
85 Header files for %{name} library.
86
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki %{name}.
89
90 %package static
91 Summary:        Static %{name} library
92 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
93 Group:          Development/Libraries
94 Requires:       %{name}-devel = %{version}-%{release}
95
96 %description static
97 Static %{name} library.
98
99 %description static -l pl.UTF-8
100 Statyczna biblioteka %{name}.
101
102 %prep
103 %setup -q
104
105 %build
106 # DON'T use full path to xl binary, just 'xl' (see lib/hypervisor/hv_xen.py for a reason)
107 %configure \
108         IP_PATH=/sbin/ip \
109         DOT=/usr/bin/dot \
110         PYLINT=/usr/bin/pylint \
111         SOCAT=/usr/bin/socat \
112         QEMUIMG_PATH=/usr/bin/qemu-img \
113         --enable-syslog \
114         --enable-htools \
115         --enable-htools-rapi \
116         --enable-confd=python \
117         --enable-socat-escape \
118         --with-ssh-initscript=/etc/rc.d/init.d/sshd \
119         --with-ssh-config-dir=/stc/ssh \
120         --with-xen-cmd=xl \
121         --with-kvm-path=/usr/bin/qemu-kvm
122
123 %{__make}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with initscript}
129 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
130 %endif
131 #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
132
133 %{__make} install \
134         DESTDIR=$RPM_BUILD_ROOT
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %pre
140 %groupadd -g xxx %{name}
141 %useradd -u xxx -d /var/lib/%{name} -g %{name} -c "XXX User" %{name}
142
143 %post
144
145 %preun
146
147 %postun
148 if [ "$1" = "0" ]; then
149         %userremove %{name}
150         %groupremove %{name}
151 fi
152
153 %if %{with ldconfig}
154 %post   -p /sbin/ldconfig
155 %postun -p /sbin/ldconfig
156 %endif
157
158 %if %{with initscript}
159 %post
160 /sbin/chkconfig --add %{name}
161 %service %{name} restart
162
163 %preun
164 if [ "$1" = "0" ]; then
165         %service -q %{name} stop
166         /sbin/chkconfig --del %{name}
167 fi
168 %endif
169
170 %if %{with systemd_service}
171 %post
172 %systemd_post %{name}.service
173
174 %preun
175 %systemd_preun %{name}.service
176
177 %postun
178 %systemd_reload
179 %endif
180
181 %files
182 %defattr(644,root,root,755)
183 %doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO
184
185 %if 0
186 # if _sysconfdir != /etc:
187 #%%dir %{_sysconfdir}
188 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
189 %attr(755,root,root) %{_bindir}/%{name}*
190 %{_datadir}/%{name}
191 %endif
192
193 # initscript and its config
194 %if %{with initscript}
195 %attr(754,root,root) /etc/rc.d/init.d/%{name}
196 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
197 %endif
198
199 %if %{with systemd_service}
200 %{systemdunitdir}/%{name}.service
201 %endif
202
203 #%{_examplesdir}/%{name}-%{version}
204
205 %if %{with subpackage}
206 %files subpackage
207 %defattr(644,root,root,755)
208 #%doc extras/*.gz
209 #%{_datadir}/%{name}-ext
210 %endif
This page took 0.076726 seconds and 3 git commands to generate.