[packages/VirtualBox] add debuginfo bcond to build without debug in first place

glen glen at pld-linux.org
Sat Mar 1 23:10:48 CET 2014


commit 077e37dc9d6a0304b8f77cfba3052f8b85bccfed
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Mar 1 22:10:25 2014 +0000

    add debuginfo bcond to build without debug in first place

 VirtualBox.spec | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index 7feaaa1..848b7c7 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -12,6 +12,7 @@
 #
 # Conditional build:
 %bcond_without	doc		# don't build the documentation
+%bcond_without	debuginfo		# disable debuginfo creation (to save space when compiling)
 %bcond_without	dist_kernel	# without distribution kernel
 %bcond_without	kernel		# don't build kernel module
 %bcond_without	userspace	# don't build userspace package
@@ -48,6 +49,10 @@ exit 1
 
 %if %{without userspace}
 # nothing to be placed to debuginfo package
+%undefine	with_debuginfo
+%endif
+
+%if %{without debuginfo}
 %define		_enable_debug_packages	0
 %endif
 
@@ -528,6 +533,8 @@ cd ../..\
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
+%patch11 -p1
 
 %{__sed} -i -e 's, at VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
 	-e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
@@ -538,6 +545,7 @@ cd ../..\
 
 %{__sed} -i -e 's#@INSTALL_DIR@#%{_libdir}/%{pname}#' src/VBox/Installer/linux/VBox.sh
 
+%if %{with kernel}
 install -d PLD-MODULE-BUILD/{GuestDrivers,HostDrivers}
 cd PLD-MODULE-BUILD
 ../src/VBox/Additions/linux/export_modules guest-modules.tar.gz
@@ -546,8 +554,7 @@ tar -zxf guest-modules.tar.gz -C GuestDrivers
 ../src/VBox/HostDrivers/linux/export_modules host-modules.tar.gz --without-hardening
 tar -zxf host-modules.tar.gz -C HostDrivers
 cd -
-%patch10 -p1
-%patch11 -p1
+%endif
 
 # using system kBuild package
 %{__rm} -r kBuild
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/VirtualBox.git/commitdiff/077e37dc9d6a0304b8f77cfba3052f8b85bccfed



More information about the pld-cvs-commit mailing list