[libreoffice] allow to limit the space needed for build

David Tardon dtardon at fedoraproject.org
Mon Jun 9 18:18:40 UTC 2014


commit f8574d3d9efae2ea0697babd60bfdc3983f36744
Author: David Tardon <dtardon at redhat.com>
Date:   Sat Jun 7 17:58:08 2014 +0200

    allow to limit the space needed for build

 libreoffice.spec |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/libreoffice.spec b/libreoffice.spec
index 41db8f5..c92d3c5 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -30,6 +30,13 @@
 # effect
 %bcond_without langpacks
 
+# remove workdir at the end of %%build, to allow build on space-constrained machines
+%ifarch s390 s390x
+%bcond_without smallbuild
+%else
+%bcond_with smallbuild
+%endif
+
 # generated by %%langpack definitions
 %global langpack_langs %{nil}
 
@@ -1266,8 +1273,17 @@ export GNOME_MIME_THEME=hicolor
 # TODO use empty variables? Should make the renaming hacks in %%install
 # unnecessary.
 . ./bin/get_config_variables PRODUCTVERSIONSHORT PRODUCTVERSION WORKDIR
-cd $WORKDIR/CustomTarget/sysui/share/libreoffice
+pushd $WORKDIR/CustomTarget/sysui/share/libreoffice
 ./create_tree.sh
+popd
+mkdir $WORKDIR/os-integration
+cp -pr $WORKDIR/CustomTarget/sysui/share/output/usr/share/* $WORKDIR/os-integration
+
+%if %{with smallbuild}
+# remove the biggest offenders
+# NOTE: not removing complete LinkTarget, as some libs are needed for smoketest
+rm -rf $WORKDIR/CxxObject $WORKDIR/GenCxxObject $WORKDIR/HelpTarget $WORKDIR/LinkTarget/CppunitTest
+%endif
 
 echo build end time is `date`, diskspace: `df -h . | tail -n 1`
 
@@ -1474,7 +1490,7 @@ for app in base calc draw impress math startcenter writer xsltfilter; do
 done
 popd
 
-pushd $WORKDIR/CustomTarget/sysui/share/output/usr/share
+pushd $WORKDIR/os-integration
 #get rid of the gnome icons and other unneeded files
 rm -rf icons/gnome applications application-registry
 


More information about the scm-commits mailing list