From dea8f61c24067ce3d783282ef6c8fcdb9580ce7a5393cc9ece1b142963fbf7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 3 Jan 2014 09:43:27 +0000 Subject: [PATCH] - Try to move all the noarch split content to /usr/share - Drop Draft.jpg nobody knows what it is :) - Remove stlport hacks as it is gone since 4.0. - Do not create compat symlink for broken SLE11 desktop file as it is not built there anymore. - Quote the langs variable so we actually use it. - Do not reduce jobs if using icecream. - Drop scsolver readme. It is quite few years dead now. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=66 --- .gitattributes | 1 - Draft.jpg | 3 - README-scsolver.txt | 11 --- libreoffice.changes | 36 ++++++++++ libreoffice.spec | 165 ++++++++++++-------------------------------- 5 files changed, 81 insertions(+), 135 deletions(-) delete mode 100644 Draft.jpg delete mode 100644 README-scsolver.txt diff --git a/.gitattributes b/.gitattributes index 35a3919..ad0e1bf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,4 +23,3 @@ *.zst filter=lfs diff=lfs merge=lfs -text ## Specific LFS patterns 185d60944ea767075d27247c3162b3bc-unowinreg.dll filter=lfs diff=lfs merge=lfs -text -Draft.jpg filter=lfs diff=lfs merge=lfs -text diff --git a/Draft.jpg b/Draft.jpg deleted file mode 100644 index bef8ad8..0000000 --- a/Draft.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1bb4308b3d1fbb5cb67b32f5427625e0c10eef2decdc121bf3aa4ba803ca7a7 -size 18978 diff --git a/README-scsolver.txt b/README-scsolver.txt deleted file mode 100644 index 8a22035..0000000 --- a/README-scsolver.txt +++ /dev/null @@ -1,11 +0,0 @@ -Dear customer, - -the "Optimization Solver for Calc" extension is not longer part of the package. -The author discontinued its development in favor of the upstream version. -Thanks for understanding. - - -Have a good experience with the upstream solver, - - Your SUSE team - diff --git a/libreoffice.changes b/libreoffice.changes index 06ff8fd..6f38011 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,39 @@ +------------------------------------------------------------------- +Fri Jan 2 23:41:44 UTC 2014 - tchvatal@suse.com + +- Try to move all the noarch split content to /usr/share + +------------------------------------------------------------------- +Fri Jan 2 21:18:04 UTC 2014 - tchvatal@suse.com + +- Drop Draft.jpg nobody knows what it is :) + +------------------------------------------------------------------- +Thu Jan 2 18:19:42 UTC 2014 - tchvatal@suse.com + +- Remove stlport hacks as it is gone since 4.0. + +------------------------------------------------------------------- +Thu Jan 2 18:17:24 UTC 2014 - tchvatal@suse.com + +- Do not create compat symlink for broken SLE11 desktop file + as it is not built there anymore. + +------------------------------------------------------------------- +Thu Jan 2 18:04:30 UTC 2014 - tchvatal@suse.com + +- Quote the langs variable so we actually use it. + +------------------------------------------------------------------- +Thu Jan 2 17:57:19 UTC 2014 - tchvatal@suse.com + +- Do not reduce jobs if using icecream. + +------------------------------------------------------------------- +Thu Jan 2 17:43:40 UTC 2014 - tchvatal@suse.com + +- Drop scsolver readme. It is quite few years dead now. + ------------------------------------------------------------------- Thu Jan 2 15:55:01 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 2047b5d..a4b6fb1 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -49,13 +49,9 @@ Source20: libreoffice-desktop-icons-256x256.tar.bz2 Source200: %{name}-rpmlintrc # Prebuilt sofficerc for the noarch upstream branding package Source201: sofficerc-upstream -# This background is used by another Novell product, added 2006-02-08 -Source202: Draft.jpg # helper scripts # create compat symlinks from %{_datadir} to %{_prefix}/lib(64); used by noarch packages Source300: link-to-ooo-home -# extensions -Source400: README-scsolver.txt # prebuilt extensions Source401: %{external_url}/27211596cf0ad97cab7321239406fde0-gdocs_%{gdocs_version}_modified.oxt Source402: %{external_url}/b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_%{numbertext_version}.oxt @@ -612,9 +608,8 @@ This package provides extensions for LibreOffice Writer: # Inspired and adjusted from Fedora spec. %define _langpack_common() \ %{_datadir}/%{name}/program/resource/*%{1}.res \ -%{_datadir}/%{name}/share/config/soffice.cfg/modules/*/ui/res/%{1} \ -%{_datadir}/%{name}/share/config/soffice.cfg/*/ui/res/%{1} \ -%{_datadir}/%{name}/share/template/%{1} \ +%{_datadir}/%{name}/share/config/soffice.cfg/modules/*/ui/res/%{1}.zip \ +%{_datadir}/%{name}/share/config/soffice.cfg/*/ui/res/%{1}.zip \ %{_datadir}/%{name}/share/registry/Langpack-%{1}.xcd \ %{_datadir}/%{name}/share/registry/res/registry_%{1}.xcd \ %{_datadir}/%{name}/share/registry/res/fcfg_langpack_%{1}.xcd \ @@ -791,8 +786,6 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} -# READMEs -cp $RPM_SOURCE_DIR/README* . %build # Parallel build settings ... @@ -809,19 +802,23 @@ free echo "System limits:" ulimit -a lo_jobs_reduced= -if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then - if test `uname -i` = "x86_64" ; then - mem_per_process=1000 - else - mem_per_process=800 +if test -e "/usr/lib/icecc/bin/gcc" -a -e "/usr/lib/icecc/bin/g++" ; then + PARALLEL_BUILD="$PARALLEL_BUILD --enable-icecream" +else + if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then + if test `uname -i` = "x86_64" ; then + mem_per_process=1000 + else + mem_per_process=800 + fi + %if 0%{?qemu_user_space_build:1} + mem_per_process=1200 + %endif + max_mem=`LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p"` + max_jobs="$(($max_mem / $mem_per_process))" + test "$lo_jobs" -gt "$max_jobs" && lo_jobs="$max_jobs" && lo_jobs_reduced="yes" && echo "Warning: Reducing number of jobs to $max_jobs because of memory limits" + test "$lo_jobs" -le 0 && lo_jobs=1 && echo "Warning: Do not use the parallel build at all becuse of memory limits" fi -%if 0%{?qemu_user_space_build:1} - mem_per_process=1200 -%endif - max_mem=`LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p"` - max_jobs="$(($max_mem / $mem_per_process))" - test "$lo_jobs" -gt "$max_jobs" && lo_jobs="$max_jobs" && lo_jobs_reduced="yes" && echo "Warning: Reducing number of jobs to $max_jobs because of memory limits" - test "$lo_jobs" -le 0 && lo_jobs=1 && echo "Warning: Do not use the parallel build at all becuse of memory limits" fi # finally set jobs PARALLEL_BUILD= @@ -829,9 +826,6 @@ if test -n "$lo_jobs" ; then PARALLEL_BUILD="--with-parallelism=$lo_jobs" fi # using icecream -if test -e "/usr/lib/icecc/bin/gcc" -a -e "/usr/lib/icecc/bin/g++" ; then - PARALLEL_BUILD="$PARALLEL_BUILD --enable-icecream" -fi # make sure that JAVA_HOME is set correctly source /etc/profile.d/alljava.sh # use RPM_OPT_FLAGS, ... @@ -864,7 +858,7 @@ export NOCONFIGURE=yes --with-system-dicts \ --with-vendor=SUSE \ --with-alloc=system \ - --with-lang=%{langpack_langs} \ + --with-lang='%{langpack_langs}' \ --disable-fetch-external \ --with-external-tar="$RPM_SOURCE_DIR" \ --disable-epm \ @@ -937,6 +931,7 @@ make unitcheck %install make DESTDIR=%{buildroot} distro-pack-install + ################ # update desktop files builddir=`pwd` @@ -956,6 +951,7 @@ for desktop in * ; do app=`echo $desktop_new | sed "s/.desktop//"` %suse_update_desktop_file $app done +# FIXED: 4.3 branch sed -i -e 's:Office;:Office;Spreadsheet;:g' %{buildroot}/%_datadir/applications/math.desktop cd - ################ @@ -977,17 +973,6 @@ echo "%dir %{_datadir}/mime-info" >>file-lists/common_list.txt echo "%dir %{_datadir}/mimelnk" >>file-lists/common_list.txt echo "%dir %{_datadir}/mimelnk/application" >>file-lists/common_list.txt ################ -# compat symlinks for the old main icon (bnc#724087) -icon_found= -for icon in `find %{buildroot}/%{_datadir}/icons -name libreoffice-main.png` ; do - icon_found=1 - icon_name=$(basename $icon) - icon_dir=$(dirname $icon | sed -e "s|^%{buildroot}||") - ln -sf $icon_name %{buildroot}/$icon_dir/ooo-gulls.png - echo "$icon_dir/ooo-gulls.png" >>file-lists/common_list.txt -done -test -z "$icon_found" && echo "ERROR: Can't find compat icon for ooo-gulls.png" && exit 1; -################ # common helpcontent files # create symlinks to %{_datadir} for noarch help packages mkdir -p %{buildroot}/%{_datadir}/%{lo_home}/help @@ -998,15 +983,33 @@ for file in idxcaption.xsl idxcontent.xsl main_transform.xsl ; do echo "%{lo_prefix}/%{lo_home}/help/$file" >>file-lists/common_list.txt echo "%{_datadir}/%{lo_home}/help/$file" >>file-lists/common_list.txt done + +################################# +# Move split noarch data to share +################################# +for i in %{buildroot}/%{_libdir}/%{lo_home}/share/config/soffice.cfg/modules/*/ui/res/*.zip \ + %{buildroot}/%{_libdir}/%{lo_home}/share/config/soffice.cfg/*/ui/res/*.zip \ + %{buildroot}/%{_libdir}/%{lo_home}/share/registry/res/fcfg_langpack_*.xcd \ + %{buildroot}/%{_libdir}/%{lo_home}/share/registry/res/registry_*.xcd \ + %{buildroot}/%{_libdir}/%{lo_home}/share/registry/Langpack-*.xcd \ + %{buildroot}/%{_libdir}/%{lo_home}/program/resource/*.res \ + %{buildroot}%{_libdir}/%{lo_home}/share/config/images*.zip \ + ; do + trg="`dirname "$i" | sed 's|%{_libdir}|%{_datadir}|'`" + mkdir -p "$trg" + mv "$i" "$trg" +done + +################ +# branding split ################ -# branding will be in separate packages # first check wheter the prebuilt sofficerc is still the same if ! diff %{buildroot}%{lo_prefix}/%{lo_home}/program/sofficerc $RPM_SOURCE_DIR/sofficerc-upstream ; then echo "Error: The file \"sofficerc\" has changed in the sources" echo " Please, update the prebuilt variant in $RPM_SOURCE_DIR/sofficerc-upstream" exit 1; fi -# replace files with symlinks to noarch packages +# create symlinks for all brandings to noarch pkg mkdir -p %{buildroot}/%{_datadir}/%{lo_home}/program/shell for file in sofficerc \ intro.png \ @@ -1023,55 +1026,26 @@ for file in sofficerc \ # it would be possible to disable the error using NO_BRP_STALE_LINK_ERROR=yes but the check is pretty useful to catch other errors touch %{buildroot}/%{_datadir}/%{lo_home}/program/$file done -################ -# extra background picture into the gallery -export galdir="%{lo_prefix}/%{lo_home}/share/gallery" -install -m 644 "$RPM_SOURCE_DIR/Draft.jpg" "%{buildroot}$galdir/www-back/" -echo "$galdir/www-back/Draft.jpg" >>file-lists/common_list.txt -# make sure that the existing galleries can be modified -chmod 644 %{buildroot}$galdir/sg*.??? -# LC_ALL=en_US.UTF-8 is necessary to make sure that the name "Backgrounds" is compared with the right localization -LC_ALL=en_US.UTF-8 %{buildroot}%{lo_prefix}/%{lo_home}/program/gengal -headless --name "Backgrounds" --path "%{buildroot}$galdir" --destdir %{buildroot} "%{buildroot}$galdir/www-back/Draft.jpg" || exit 1; + ################ # FIXME: fast hack to solve a customer issue, n#364523 # we need a more generic solution +# FIXME: can be done better, see how fedora does it and imitate ln -sf acor_fr-FR.dat %{buildroot}%{lo_prefix}/%{lo_home}/share/autocorr/acor_fr-CA.dat echo "%{lo_prefix}/%{lo_home}/share/autocorr/acor_fr-CA.dat" >>file-lists/common_list.txt -################ -# helper script to create libstlport compat symlink (bnc#458952) -%ifarch %{ix86} -cat << EOF > %{buildroot}%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links -#!/bin/sh -# helper script to create compat link needed to run upstream extensions (bnc#458952) -if ! test -L %{_libdir}/libstlport_gcc.so -a -r %{_libdir}/libstlport_gcc.so ; then - lib_name=\`ls %{_libexecdir}/libstlport_gcc.so.4* 2>/dev/null | tail -n 1\` - if test -n "\$lib_name" -a -r "\$lib_name" ; then - lib_name=\`basename \$lib_name\` - rm -f %{_libdir}/libstlport_gcc.so - ln -sf \$lib_name %{_libdir}/libstlport_gcc.so - fi -fi -EOF -chmod 755 %{buildroot}%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links -echo "%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links" >>file-lists/common_list.txt -%endif # Symlink uno.py and unohelper.py so that python can find them mkdir -p %{buildroot}%{python_sitelib} ln -s %{_libdir}/libreoffice/program/uno.py %{buildroot}%{python_sitelib}/uno.py ln -s %{_libdir}/libreoffice/program/unohelper.py %{buildroot}%{python_sitelib}/unohelper.py -# Move icon themes from lib to share -mkdir -p %{buildroot}%{_datadir}/%{lo_home}/share/config -mv %{buildroot}%{_libdir}/%{lo_home}/share/config/images*.zip %{buildroot}%{_datadir}/%{lo_home}/share/config/ - # We have ton of duped files so run over it -%fdupes %{buildroot}/usr +%fdupes -s %{buildroot}/usr %pre # do not crate cache for bundled extensions because it is not secure # rather remove it (fdo#53006, fdo#51252, bnc#769448) -# Remove after 12.2 is out of support scope. +# Remove after 12.2 is out of support/migration scope. bundled_cache="%{lo_prefix}/%{lo_home}/share/prereg/bundled" test -d "$bundled_cache" && rm -rf "$bundled_cache"/* || true; @@ -1080,12 +1054,6 @@ test -d "$bundled_cache" && rm -rf "$bundled_cache"/* || true; %mime_database_post %desktop_database_post %icon_theme_cache_post -# do not crate the cache because it is not secure -# remove the system cache for bundled extensions; it is not secure (fdo#53006, fdo#51252) -# it has not been created since LO-3.6.1, August 2012 -bundled_cache="%{lo_prefix}/%{lo_home}/share/prereg/bundled" -test -d "$bundled_cache" && rm -rf "$bundled_cache"/* || true; -exit 0 %preun test "$1" = "0" && rm -rf ./%{lo_prefix}/%{lo_home}/share/uno_packages/cache || true @@ -1095,48 +1063,6 @@ test "$1" = "0" && rm -rf ./%{lo_prefix}/%{lo_home}/share/uno_packages/cache || %icon_theme_cache_postun %desktop_database_postun %mime_database_postun -%ifarch %{ix86} -if test $1 = 0 ; then - # LO is removed => remove the link as well if it is not created by stlport-devel package (bnc#458952) - if test -L %{_libdir}/libstlport_gcc.so -a ! -r %{_includedir}/stlport/ctime ; then - rm -f %{_libdir}/libstlport_gcc.so - fi -fi -%endif -exit 0 - -%posttrans -%ifarch %{ix86} -# the compat link was %%ghost in old OOo-ure packages, so it might be removed also during OOo-ure update (bnc#458952) -if test -f %{lo_prefix}/%{lo_home}/ure/bin/javaldx ; then - %{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links || true; -fi -%endif - -%ifarch %{ix86} -%triggerin -- mysql-connector-java -%{lo_prefix}/%{lo_home}/program/java-set-classpath %{_datadir}/java/mysql-connector-java.jar || true - -%triggerpostun -- mysql-connector-java -%{lo_prefix}/%{lo_home}/program/java-set-classpath %{_datadir}/java/mysql-connector-java.jar || true - -%triggerin -- libstlport_gcc4 -# create compat link needed to run upstream extensions (bnc#458952) -%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links || true; - -%triggerpostun -- libstlport_gcc4-devel -# create compat link needed to run upstream extensions (bnc#458952) -%{lo_prefix}/%{lo_home}/ure/bin/create-libstlport-compat-links || true; - -%triggerpostun -- libstlport_gcc4 -# remove compat link needed to run upstream extensions (bnc#458952) -if test $2 = 0 ; then - if test -L %{_libdir}/libstlport_gcc.so -a ! -r %{_libdir}/libstlport_gcc.so ; then - rm -f %{_libdir}/libstlport_gcc.so - fi -fi -exit 0 -%endif %post base %desktop_database_post @@ -1244,7 +1170,6 @@ exit 0 %files calc-extensions %defattr(-,root,root) -%doc README-scsolver.txt %{lo_prefix}/%{lo_home}/share/extensions/ConvertTextToNumber %{lo_prefix}/%{lo_home}/share/extensions/nlpsolver %{lo_prefix}/%{lo_home}/share/extensions/numbertext