1 | #
|
---|
2 | # Spec file for creating VirtualBox rpm packages
|
---|
3 | #
|
---|
4 |
|
---|
5 | #
|
---|
6 | # Copyright (C) 2006-2010 Oracle Corporation
|
---|
7 | #
|
---|
8 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | # available from http://www.virtualbox.org. This file is free software;
|
---|
10 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | # General Public License as published by the Free Software Foundation,
|
---|
12 | # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
13 | # distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
14 | # be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | #
|
---|
16 |
|
---|
17 | %define %SPEC% 1
|
---|
18 | %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
---|
19 |
|
---|
20 | Summary: Oracle VM VirtualBox
|
---|
21 | Name: %NAME%
|
---|
22 | Version: %BUILDVER%_%BUILDREL%
|
---|
23 | Release: 1
|
---|
24 | URL: http://www.virtualbox.org/
|
---|
25 | Source: VirtualBox.tar.bz2
|
---|
26 | License: VirtualBox Personal Use and Evaluation License (PUEL)
|
---|
27 | Group: Applications/System
|
---|
28 | Vendor: Oracle Corporation
|
---|
29 | BuildRoot: %BUILDROOT%
|
---|
30 | Requires: %LIBASOUND%
|
---|
31 |
|
---|
32 | %if %{?rpm_suse:1}%{!?rpm_suse:0}
|
---|
33 | %debug_package
|
---|
34 | %endif
|
---|
35 |
|
---|
36 | %MACROSPYTHON%
|
---|
37 |
|
---|
38 |
|
---|
39 | %description
|
---|
40 | VirtualBox is a powerful PC virtualization solution allowing
|
---|
41 | you to run a wide range of PC operating systems on your Linux
|
---|
42 | system. This includes Windows, Linux, FreeBSD, DOS, OpenBSD
|
---|
43 | and others. VirtualBox comes with a broad feature set and
|
---|
44 | excellent performance, making it the premier virtualization
|
---|
45 | software solution on the market.
|
---|
46 |
|
---|
47 |
|
---|
48 | %prep
|
---|
49 | %setup -q
|
---|
50 | DESTDIR=""
|
---|
51 | unset DESTDIR
|
---|
52 |
|
---|
53 |
|
---|
54 | %build
|
---|
55 |
|
---|
56 |
|
---|
57 | %install
|
---|
58 | # Mandriva: prevent replacing 'echo' by 'gprintf'
|
---|
59 | export DONT_GPRINTIFY=1
|
---|
60 | rm -rf $RPM_BUILD_ROOT
|
---|
61 | install -m 755 -d $RPM_BUILD_ROOT/sbin
|
---|
62 | install -m 755 -d $RPM_BUILD_ROOT%{_initrddir}
|
---|
63 | install -m 755 -d $RPM_BUILD_ROOT/lib/modules
|
---|
64 | install -m 755 -d $RPM_BUILD_ROOT/etc/vbox
|
---|
65 | install -m 755 -d $RPM_BUILD_ROOT/usr/bin
|
---|
66 | install -m 755 -d $RPM_BUILD_ROOT/usr/src
|
---|
67 | install -m 755 -d $RPM_BUILD_ROOT/usr/share/applications
|
---|
68 | install -m 755 -d $RPM_BUILD_ROOT/usr/share/pixmaps
|
---|
69 | install -m 755 -d $RPM_BUILD_ROOT%{_defaultdocdir}/virtualbox
|
---|
70 | install -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
71 | install -m 755 -d $RPM_BUILD_ROOT/usr/share/virtualbox
|
---|
72 | mv VBoxEFI32.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
|
---|
73 | mv VBoxEFI64.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
|
---|
74 | mv *.gc $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
75 | mv *.r0 $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
76 | mv *.rel $RPM_BUILD_ROOT/usr/lib/virtualbox || true
|
---|
77 | mv VBoxNetDHCP $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
78 | mv VBoxNetAdpCtl $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
79 | mv VBoxXPCOMIPCD $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
80 | mv components $RPM_BUILD_ROOT/usr/lib/virtualbox/components
|
---|
81 | mv *.so $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
82 | mv *.so.4 $RPM_BUILD_ROOT/usr/lib/virtualbox || true
|
---|
83 | mv VBoxTestOGL $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
84 | mv vboxshell.py $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
85 | (export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \
|
---|
86 | cd ./sdk/installer && \
|
---|
87 | %{__python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT)
|
---|
88 | rm -rf sdk/installer
|
---|
89 | mv sdk $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
90 | mv nls $RPM_BUILD_ROOT/usr/share/virtualbox
|
---|
91 | cp -a src $RPM_BUILD_ROOT/usr/share/virtualbox
|
---|
92 | mv VBox.sh $RPM_BUILD_ROOT/usr/bin/VBox
|
---|
93 | mv VBoxSysInfo.sh $RPM_BUILD_ROOT/usr/share/virtualbox
|
---|
94 | for i in VBoxManage VBoxSVC VBoxSDL VirtualBox VBoxHeadless vboxwebsrv webtest; do
|
---|
95 | mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done
|
---|
96 | for i in VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl; do
|
---|
97 | chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/$i; done
|
---|
98 | mv VBoxTunctl $RPM_BUILD_ROOT/usr/bin
|
---|
99 | for d in /lib/modules/*; do
|
---|
100 | if [ -L $d/build ]; then
|
---|
101 | rm -f /tmp/vboxdrv-Module.symvers
|
---|
102 | ./src/vboxhost/vboxdrv/build_in_tmp \
|
---|
103 | --save-module-symvers /tmp/vboxdrv-Module.symvers \
|
---|
104 | KBUILD_VERBOSE= KERN_DIR=$d/build MODULE_DIR=$RPM_BUILD_ROOT/$d/misc -j4 \
|
---|
105 | %INSTMOD%
|
---|
106 | ./src/vboxhost/vboxnetflt/build_in_tmp \
|
---|
107 | --use-module-symvers /tmp/vboxdrv-Module.symvers \
|
---|
108 | KBUILD_VERBOSE= KERN_DIR=$d/build MODULE_DIR=$RPM_BUILD_ROOT/$d/misc -j4 \
|
---|
109 | %INSTMOD%
|
---|
110 | ./src/vboxhost/vboxnetadp/build_in_tmp \
|
---|
111 | --use-module-symvers /tmp/vboxdrv-Module.symvers \
|
---|
112 | KBUILD_VERBOSE= KERN_DIR=$d/build MODULE_DIR=$RPM_BUILD_ROOT/$d/misc -j4 \
|
---|
113 | %INSTMOD%
|
---|
114 | fi
|
---|
115 | done
|
---|
116 | mv kchmviewer $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
117 | for i in rdesktop-vrdp.tar.gz rdesktop-vrdp-keymaps additions/VBoxGuestAdditions.iso; do
|
---|
118 | mv $i $RPM_BUILD_ROOT/usr/share/virtualbox; done
|
---|
119 | if [ -d accessible ]; then
|
---|
120 | mv accessible $RPM_BUILD_ROOT/usr/lib/virtualbox
|
---|
121 | fi
|
---|
122 | mv rdesktop-vrdp $RPM_BUILD_ROOT/usr/bin
|
---|
123 | install -D -m 755 vboxdrv.init $RPM_BUILD_ROOT%{_initrddir}/vboxdrv
|
---|
124 | %if %{?rpm_suse:1}%{!?rpm_suse:0}
|
---|
125 | ln -sf ../etc/init.d/vboxdrv $RPM_BUILD_ROOT/sbin/rcvboxdrv
|
---|
126 | %endif
|
---|
127 | install -D -m 755 vboxweb-service.init $RPM_BUILD_ROOT%{_initrddir}/vboxweb-service
|
---|
128 | %if %{?rpm_suse:1}%{!?rpm_suse:0}
|
---|
129 | ln -sf ../etc/init.d/vboxweb-service $RPM_BUILD_ROOT/sbin/rcvboxweb-service
|
---|
130 | %endif
|
---|
131 | ln -s VBox $RPM_BUILD_ROOT/usr/bin/VirtualBox
|
---|
132 | ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxManage
|
---|
133 | ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxSDL
|
---|
134 | ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxVRDP
|
---|
135 | ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxHeadless
|
---|
136 | ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxwebsrv
|
---|
137 | ln -s /usr/share/virtualbox/src/vboxhost $RPM_BUILD_ROOT/usr/src/vboxhost-%VER%
|
---|
138 | mv virtualbox.desktop $RPM_BUILD_ROOT/usr/share/applications/virtualbox.desktop
|
---|
139 | mv VBox.png $RPM_BUILD_ROOT/usr/share/pixmaps/VBox.png
|
---|
140 |
|
---|
141 |
|
---|
142 | %pre
|
---|
143 | # defaults
|
---|
144 | [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
---|
145 |
|
---|
146 | # check for active VMs of the installed (old) package
|
---|
147 | VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
|
---|
148 | if [ -n "$VBOXSVC_PID" ]; then
|
---|
149 | # executed before the new package is installed!
|
---|
150 | if [ -f /etc/init.d/vboxweb-service ]; then
|
---|
151 | # try graceful termination; terminate the webservice first
|
---|
152 | /etc/init.d/vboxweb-service stop 2>/dev/null || true
|
---|
153 | # ask the daemon to terminate immediately
|
---|
154 | kill -USR1 $VBOXSVC_PID
|
---|
155 | fi
|
---|
156 | sleep 1
|
---|
157 | if pidof VBoxSVC > /dev/null 2>&1; then
|
---|
158 | echo "A copy of VirtualBox is currently running. Please close it and try again."
|
---|
159 | echo "Please note that it can take up to ten seconds for VirtualBox (in particular"
|
---|
160 | echo "the VBoxSVC daemon) to finish running."
|
---|
161 | exit 1
|
---|
162 | fi
|
---|
163 | fi
|
---|
164 |
|
---|
165 | # check for old installation
|
---|
166 | if [ -r /etc/vbox/vbox.cfg ]; then
|
---|
167 | . /etc/vbox/vbox.cfg
|
---|
168 | if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then
|
---|
169 | echo "An old installation of VirtualBox was found. To install this package the"
|
---|
170 | echo "old package has to be removed first. Have a look at /etc/vbox/vbox.cfg to"
|
---|
171 | echo "determine the installation directory of the previous installation. After"
|
---|
172 | echo "uninstalling the old package remove the file /etc/vbox/vbox.cfg."
|
---|
173 | exit 1
|
---|
174 | fi
|
---|
175 | fi
|
---|
176 |
|
---|
177 | # XXX remove old modules from previous versions (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)
|
---|
178 | if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
|
---|
179 | find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2> /dev/null || true
|
---|
180 | find /lib/modules -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2> /dev/null || true
|
---|
181 | find /lib/modules -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2> /dev/null || true
|
---|
182 | fi
|
---|
183 |
|
---|
184 |
|
---|
185 | %post
|
---|
186 | LOG="/var/log/vbox-install.log"
|
---|
187 |
|
---|
188 | # defaults
|
---|
189 | [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
---|
190 |
|
---|
191 | # remove old cruft
|
---|
192 | if [ -f /etc/init.d/vboxdrv.sh ]; then
|
---|
193 | echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
|
---|
194 | rm /etc/init.d/vboxdrv.sh
|
---|
195 | fi
|
---|
196 | if [ -f /etc/vbox/vbox.cfg ]; then
|
---|
197 | echo "Found old version of /etc/vbox/vbox.cfg, removing."
|
---|
198 | rm /etc/vbox/vbox.cfg
|
---|
199 | fi
|
---|
200 | rm -f /etc/vbox/module_not_compiled
|
---|
201 |
|
---|
202 | # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox)
|
---|
203 | if [ -d /etc/udev/rules.d -a "$INSTALL_NO_UDEV" != "1" ]; then
|
---|
204 | udev_call=""
|
---|
205 | udev_app=`which udevadm 2> /dev/null`
|
---|
206 | if [ $? -eq 0 ]; then
|
---|
207 | udev_call="${udev_app} version 2> /dev/null"
|
---|
208 | else
|
---|
209 | udev_app=`which udevinfo 2> /dev/null`
|
---|
210 | if [ $? -eq 0 ]; then
|
---|
211 | udev_call="${udev_app} -V 2> /dev/null"
|
---|
212 | fi
|
---|
213 | fi
|
---|
214 | udev_fix="="
|
---|
215 | if [ "${udev_call}" != "" ]; then
|
---|
216 | udev_out=`${udev_call}`
|
---|
217 | udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'`
|
---|
218 | if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then
|
---|
219 | udev_fix=""
|
---|
220 | fi
|
---|
221 | fi
|
---|
222 | echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \
|
---|
223 | > /etc/udev/rules.d/10-vboxdrv.rules
|
---|
224 | echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \
|
---|
225 | >> /etc/udev/rules.d/10-vboxdrv.rules
|
---|
226 | echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \
|
---|
227 | >> /etc/udev/rules.d/10-vboxdrv.rules
|
---|
228 | fi
|
---|
229 | # Remove old udev description file
|
---|
230 | if [ -f /etc/udev/rules.d/60-vboxdrv.rules ]; then
|
---|
231 | rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null
|
---|
232 | fi
|
---|
233 | # Push the permissions to the USB device nodes. One of these should match.
|
---|
234 | # Rather nasty to use udevadm trigger for this, but I don't know of any
|
---|
235 | # better way.
|
---|
236 | udevadm trigger --subsystem-match=usb > /dev/null 2>&1
|
---|
237 | udevtrigger --subsystem-match=usb > /dev/null 2>&1
|
---|
238 | udevtrigger --subsystem-match=usb_device > /dev/null 2>&1
|
---|
239 | udevplug -Busb > /dev/null 2>&1
|
---|
240 |
|
---|
241 | # XXX SELinux: allow text relocation entries
|
---|
242 | %if %{?rpm_redhat:1}%{!?rpm_redhat:0}
|
---|
243 | if [ -x /usr/bin/chcon ]; then
|
---|
244 | chcon -t texrel_shlib_t /usr/lib/virtualbox/*VBox* > /dev/null 2>&1
|
---|
245 | chcon -t texrel_shlib_t /usr/lib/virtualbox/VirtualBox.so > /dev/null 2>&1
|
---|
246 | chcon -t texrel_shlib_t /usr/lib/virtualbox/VRDPAuth.so > /dev/null 2>&1
|
---|
247 | chcon -t texrel_shlib_t /usr/lib/virtualbox/components/VBox*.so > /dev/null 2>&1
|
---|
248 | chcon -t java_exec_t /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1
|
---|
249 | chcon -t java_exec_t /usr/lib/virtualbox/VBoxSDL > /dev/null 2>&1
|
---|
250 | chcon -t java_exec_t /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1
|
---|
251 | chcon -t java_exec_t /usr/lib/virtualbox/vboxwebsrv > /dev/null 2>&1
|
---|
252 | fi
|
---|
253 | %endif
|
---|
254 |
|
---|
255 | # create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
|
---|
256 | if [ "$INSTALL_NO_GROUP" != "1" ]; then
|
---|
257 | echo
|
---|
258 | echo "Creating group 'vboxusers'. VM users must be member of that group!"
|
---|
259 | echo
|
---|
260 | groupadd -f vboxusers 2> /dev/null
|
---|
261 | fi
|
---|
262 | %if %{?rpm_redhat:1}%{!?rpm_redhat:0}
|
---|
263 | /sbin/chkconfig --add vboxdrv
|
---|
264 | /sbin/chkconfig --add vboxweb-service
|
---|
265 | %endif
|
---|
266 | %if %{?rpm_suse:1}%{!?rpm_suse:0}
|
---|
267 | %{fillup_and_insserv -f -y -Y vboxdrv vboxweb-service}
|
---|
268 | %endif
|
---|
269 | %if %{?rpm_mdv:1}%{!?rpm_mdv:0}
|
---|
270 | /sbin/ldconfig
|
---|
271 | %_post_service vboxdrv
|
---|
272 | %_post_service vboxweb-service
|
---|
273 | %{update_desktop_database}
|
---|
274 | %update_menus
|
---|
275 | %endif
|
---|
276 |
|
---|
277 | # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox
|
---|
278 | BUILD_MODULES=0
|
---|
279 | REGISTER_MODULES=1
|
---|
280 | if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then
|
---|
281 | REGISTER_MODULES=0
|
---|
282 | if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
|
---|
283 | # compile problem
|
---|
284 | cat << EOF
|
---|
285 | No precompiled module for this kernel found -- trying to build one. Messages
|
---|
286 | emitted during module compilation will be logged to $LOG.
|
---|
287 |
|
---|
288 | EOF
|
---|
289 | BUILD_MODULES=1
|
---|
290 | fi
|
---|
291 | fi
|
---|
292 | # if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules
|
---|
293 | if [ "$INSTALL_NO_VBOXDRV" = "1" ]; then
|
---|
294 | rm -f /lib/modules/*/misc/vboxdrv.ko
|
---|
295 | rm -f /lib/modules/*/misc/vboxnetflt.ko
|
---|
296 | rm -f /lib/modules/*/misc/vboxnetadp.ko
|
---|
297 | fi
|
---|
298 | if [ $BUILD_MODULES -eq 1 ]; then
|
---|
299 | /etc/init.d/vboxdrv setup || true
|
---|
300 | else
|
---|
301 | if lsmod | grep -q "vboxdrv[^_-]"; then
|
---|
302 | /etc/init.d/vboxdrv stop || true
|
---|
303 | fi
|
---|
304 | if [ $REGISTER_MODULES -eq 1 ]; then
|
---|
305 | DKMS=`which dkms 2>/dev/null`
|
---|
306 | if [ -n "$DKMS" ]; then
|
---|
307 | $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true
|
---|
308 | fi
|
---|
309 | fi
|
---|
310 | /etc/init.d/vboxdrv start > /dev/null
|
---|
311 | fi
|
---|
312 | /etc/init.d/vboxweb-service start > /dev/null
|
---|
313 |
|
---|
314 |
|
---|
315 | %preun
|
---|
316 | # $1==0: remove the last version of the package
|
---|
317 | # $1==1: install the first time
|
---|
318 | # $1>=2: upgrade
|
---|
319 | %if %{?rpm_suse:1}%{!?rpm_suse:0}
|
---|
320 | %stop_on_removal vboxweb-service
|
---|
321 | %endif
|
---|
322 | %if %{?rpm_mdv:1}%{!?rpm_mdv:0}
|
---|
323 | %_preun_service vboxweb-service
|
---|
324 | %endif
|
---|
325 | %if %{?rpm_redhat:1}%{!?rpm_redhat:0}
|
---|
326 | if [ "$1" = 0 ]; then
|
---|
327 | /sbin/service vboxweb-service stop > /dev/null
|
---|
328 | /sbin/chkconfig --del vboxweb-service
|
---|
329 | fi
|
---|
330 | %endif
|
---|
331 |
|
---|
332 | if [ "$1" = 0 ]; then
|
---|
333 | # check for active VMs
|
---|
334 | VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
|
---|
335 | if [ -n "$VBOXSVC_PID" ]; then
|
---|
336 | kill -USR1 $VBOXSVC_PID
|
---|
337 | sleep 1
|
---|
338 | if pidof VBoxSVC > /dev/null 2>&1; then
|
---|
339 | echo "A copy of VirtualBox is currently running. Please close it and try again."
|
---|
340 | echo "Please note that it can take up to ten seconds for VirtualBox (in particular"
|
---|
341 | echo "the VBoxSVC daemon) to finish running."
|
---|
342 | exit 1
|
---|
343 | fi
|
---|
344 | fi
|
---|
345 | fi
|
---|
346 | %if %{?rpm_suse:1}%{!?rpm_suse:0}
|
---|
347 | %stop_on_removal vboxdrv
|
---|
348 | %endif
|
---|
349 | %if %{?rpm_mdv:1}%{!?rpm_mdv:0}
|
---|
350 | %_preun_service vboxdrv
|
---|
351 | %endif
|
---|
352 | if [ "$1" = 0 ]; then
|
---|
353 | %if %{?rpm_redhat:1}%{!?rpm_redhat:0}
|
---|
354 | /sbin/service vboxdrv stop > /dev/null
|
---|
355 | /sbin/chkconfig --del vboxdrv
|
---|
356 | %endif
|
---|
357 | rm -f /etc/udev/rules.d/10-vboxdrv.rules
|
---|
358 | rm -f /etc/vbox/license_agreed
|
---|
359 | rm -f /etc/vbox/module_not_compiled
|
---|
360 | fi
|
---|
361 | DKMS=`which dkms 2>/dev/null`
|
---|
362 | if [ -n "$DKMS" ]; then
|
---|
363 | $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true
|
---|
364 | fi
|
---|
365 |
|
---|
366 |
|
---|
367 | %postun
|
---|
368 | %if %{?rpm_redhat:1}%{!?rpm_redhat:0}
|
---|
369 | if [ "$1" -ge 1 ]; then
|
---|
370 | /sbin/service vboxdrv restart > /dev/null 2>&1
|
---|
371 | /sbin/service vboxweb-service restart > /dev/null 2>&1
|
---|
372 | fi
|
---|
373 | %endif
|
---|
374 | %if %{?rpm_suse:1}%{!?rpm_suse:0}
|
---|
375 | %restart_on_update vboxdrv vboxweb-service
|
---|
376 | %insserv_cleanup
|
---|
377 | %endif
|
---|
378 | %if %{?rpm_mdv:1}%{!?rpm_mdv:0}
|
---|
379 | /sbin/ldconfig
|
---|
380 | %{clean_desktop_database}
|
---|
381 | %clean_menus
|
---|
382 | %endif
|
---|
383 |
|
---|
384 |
|
---|
385 | %clean
|
---|
386 | rm -rf $RPM_BUILD_ROOT
|
---|
387 |
|
---|
388 |
|
---|
389 | %files
|
---|
390 | %defattr(-,root,root)
|
---|
391 | %doc LICENSE
|
---|
392 | %doc %LICENSE%
|
---|
393 | %doc UserManual*.pdf
|
---|
394 | %doc VirtualBox*.chm
|
---|
395 | %{_initrddir}/vboxdrv
|
---|
396 | %{_initrddir}/vboxweb-service
|
---|
397 | %{?rpm_suse: %{py_sitedir}/*}
|
---|
398 | %{!?rpm_suse: %{python_sitelib}/*}
|
---|
399 | %{?rpm_suse: /sbin/rcvboxdrv}
|
---|
400 | %{?rpm_suse: /sbin/rcvboxweb-service}
|
---|
401 | /lib/modules
|
---|
402 | /etc/vbox
|
---|
403 | /usr/bin
|
---|
404 | /usr/src/vbox*
|
---|
405 | /usr/lib/virtualbox
|
---|
406 | /usr/share/applications
|
---|
407 | /usr/share/pixmaps
|
---|
408 | /usr/share/virtualbox
|
---|