Accepting request 309068 from LibreOffice:Factory
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/309068 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=93
This commit is contained in:
commit
20b7d6424e
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 21 11:59:03 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
- Update %post scriptlets to work on sle11 again
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 20 08:45:37 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
- Split out the share -> lib linker to hopefully allow sle11 build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 13 11:31:52 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
|
114
libreoffice.spec
114
libreoffice.spec
@ -77,9 +77,6 @@ Source20: libreoffice-desktop-icons-256x256.tar.bz2
|
||||
Source99: %{name}-rpmlintrc
|
||||
# Prebuilt sofficerc for the noarch upstream branding package
|
||||
Source201: sofficerc-upstream
|
||||
# helper scripts
|
||||
# create compat symlinks from %{_datadir} to %{_prefix}/lib(64); used by noarch packages
|
||||
Source300: link-to-ooo-home
|
||||
# prebuilt extensions
|
||||
Source402: %{external_url}/b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_%{numbertext_version}.oxt
|
||||
# used extensions sources
|
||||
@ -175,6 +172,7 @@ Patch6: 0001-Make-cpp-poppler-version.h-header-optional.patch
|
||||
Patch7: 0001-Make-HAVE_JAVA6-be-always-false.patch
|
||||
# try to save space by using hardlinks
|
||||
Patch990: install-with-hardlinks.diff
|
||||
BuildRequires: %{name}-share-linker
|
||||
BuildRequires: %{python_type}-devel
|
||||
BuildRequires: %{python_type}-xml
|
||||
BuildRequires: ImageMagick
|
||||
@ -385,8 +383,8 @@ This package includes the original branding for the LibreOffice office suite.
|
||||
Summary: Crystal LibreOffice Icon Theme (KDE3 default)
|
||||
License: LGPL-2.1
|
||||
Group: Productivity/Office/Suite
|
||||
Requires(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
Requires(post): %{name}-share-linker
|
||||
Requires(postun): %{name}-share-linker
|
||||
Provides: libreoffice-icon-themes = %{version}
|
||||
Obsoletes: libreoffice-icon-themes < %{version}
|
||||
%if %{with noarch_subpkgs}
|
||||
@ -400,8 +398,8 @@ This package provides Crystal LibreOffice icon theme. It is used in KDE3 by defa
|
||||
Summary: Galaxy LibreOffice Icon Theme (OOo-3.x default)
|
||||
License: LGPL-3.0
|
||||
Group: Productivity/Office/Suite
|
||||
Requires(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
Requires(post): %{name}-share-linker
|
||||
Requires(postun): %{name}-share-linker
|
||||
Supplements: libreoffice
|
||||
Provides: libreoffice-icon-themes = %{version}
|
||||
Obsoletes: libreoffice-icon-themes < %{version}
|
||||
@ -416,8 +414,8 @@ This package provides Galaxy LibreOffice icon theme. It is used in the original
|
||||
Summary: Hicontrast LibreOffice Icon Theme
|
||||
License: LGPL-3.0
|
||||
Group: Productivity/Office/Suite
|
||||
Requires(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
Requires(post): %{name}-share-linker
|
||||
Requires(postun): %{name}-share-linker
|
||||
Supplements: libreoffice
|
||||
Provides: libreoffice-icon-themes = %{version}
|
||||
Obsoletes: libreoffice-icon-themes < %{version}
|
||||
@ -432,8 +430,8 @@ This package provides Hicontrast LibreOffice icon theme.
|
||||
Summary: Oxygen LibreOffice Icon Theme (KDE4 default)
|
||||
License: LGPL-3.0 or CC-BY-SA-3.0
|
||||
Group: Productivity/Office/Suite
|
||||
Requires(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
Requires(post): %{name}-share-linker
|
||||
Requires(postun): %{name}-share-linker
|
||||
Supplements: packageand(libreoffice:kdebase4-workspace)
|
||||
Provides: libreoffice-icon-themes = %{version}
|
||||
Obsoletes: libreoffice-icon-themes < %{version}
|
||||
@ -448,8 +446,8 @@ This package provides Oxygen LibreOffice icon theme. It is used in KDE4 by defau
|
||||
Summary: Sifr LibreOffice Icon Theme
|
||||
License: LGPL-3.0
|
||||
Group: Productivity/Office/Suite
|
||||
Requires(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
Requires(post): %{name}-share-linker
|
||||
Requires(postun): %{name}-share-linker
|
||||
Supplements: libreoffice
|
||||
Provides: libreoffice-icon-themes = %{version}
|
||||
Obsoletes: libreoffice-icon-themes < %{version}
|
||||
@ -464,8 +462,8 @@ This package provides Sifr LibreOffice icon theme.
|
||||
Summary: Tango LibreOffice Icon Theme (GNOME default)
|
||||
License: LGPL-3.0
|
||||
Group: Productivity/Office/Suite
|
||||
Requires(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
Requires(post): %{name}-share-linker
|
||||
Requires(postun): %{name}-share-linker
|
||||
Supplements: packageand(libreoffice:gnome-session)
|
||||
Provides: libreoffice-icon-themes = %{version}
|
||||
Obsoletes: libreoffice-icon-themes < %{version}
|
||||
@ -754,12 +752,12 @@ done \
|
||||
%posttrans %{1} \
|
||||
rpm -ql %{name}-%{1} > %{_datadir}/libreoffice/%{1}_list.txt || true \
|
||||
if [ -f %{_datadir}/libreoffice/%{1}_list.txt ] ; then \
|
||||
%{_datadir}/libreoffice/link-to-ooo-home %{_datadir}/libreoffice/%{1}_list.txt || true \
|
||||
%{_bindir}/libreoffice-share-linker %{_datadir}/libreoffice/%{1}_list.txt || true \
|
||||
fi \
|
||||
\
|
||||
%postun %{1} \
|
||||
if [ "$1" = "0" -a -f %{_datadir}/libreoffice/%{1}_list.txt -a -f %{_datadir}/libreoffice/link-to-ooo-home ]; then \
|
||||
%{_datadir}/libreoffice/link-to-ooo-home --unlink %{_datadir}/libreoffice/%{1}_list.txt || true \
|
||||
if [ "$1" = "0" -a -f %{_datadir}/libreoffice/%{1}_list.txt -a -f %{_bindir}/libreoffice-share-linker ]; then \
|
||||
%{_bindir}/libreoffice-share-linker --unlink %{_datadir}/libreoffice/%{1}_list.txt || true \
|
||||
rm -f %{_datadir}/libreoffice/%{1}_list.txt 2> /dev/null || true \
|
||||
fi \
|
||||
%{nil}
|
||||
@ -840,9 +838,8 @@ fi \
|
||||
Summary: %{langname} Localization Files for LibreOffice \
|
||||
Group: Productivity/Office/Suite \
|
||||
Requires: %{name} = %{version} \
|
||||
Requires: %{name}-share-linker \
|
||||
Provides: locale(libreoffice:%{lang}) \
|
||||
Requires(post,): %{name} = %{version} \
|
||||
Requires(postun,): %{name} = %{version} \
|
||||
%if %{with noarch_subpkgs} \
|
||||
BuildArch: noarch \
|
||||
%endif \
|
||||
@ -1189,11 +1186,9 @@ cd -
|
||||
################
|
||||
# compat stuff for noarch packages
|
||||
mkdir -p %{buildroot}/%{_datadir}/%{name}/program
|
||||
install -m 755 $RPM_SOURCE_DIR/link-to-ooo-home %{buildroot}%{_datadir}/%{name}/
|
||||
echo "%dir %{_libdir}/%{name}" >>file-lists/common_list.txt
|
||||
echo "%dir %{_datadir}/%{name}" >>file-lists/common_list.txt
|
||||
echo "%dir %{_datadir}/%{name}/program" >>file-lists/common_list.txt
|
||||
echo "%{_datadir}/%{name}/link-to-ooo-home" >>file-lists/common_list.txt
|
||||
################
|
||||
# helper script for noarch packages
|
||||
# add missing directories to the file list
|
||||
@ -1240,7 +1235,6 @@ mkdir -p %{buildroot}/%{_datadir}/%{name}/share/autotext/
|
||||
grep -v '%{_libdir}/%{name}/share/autotext' file-lists/common_list.txt > tmplist
|
||||
mv tmplist file-lists/common_list.txt
|
||||
mv %{buildroot}/%{_libdir}/%{name}/share/autotext/ %{buildroot}/%{_datadir}/%{name}/share/
|
||||
echo "%ghost %{_libdir}/%{name}/share/autotext" >> file-lists/common_list.txt
|
||||
|
||||
################
|
||||
# branding split
|
||||
@ -1324,9 +1318,16 @@ chrpath --delete %{buildroot}%{_libdir}/%{name}/program/librasqal-lo.so.3
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if %suse_version > 1130
|
||||
%mime_database_post
|
||||
%desktop_database_post
|
||||
%icon_theme_cache_post
|
||||
%else
|
||||
test -f /usr/bin/update-mime-database && /usr/bin/update-mime-database %{_datadir}/mime > /dev/null || :
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.gtk2 && SuSEconfig --module gtk2 > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%preun
|
||||
uno_cache="%{_libdir}/%{name}/share/uno_packages/cache/uno_packages/"
|
||||
@ -1337,45 +1338,112 @@ exit 0
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%if %suse_version > 1130
|
||||
%icon_theme_cache_postun
|
||||
%desktop_database_postun
|
||||
%mime_database_postun
|
||||
%else
|
||||
test -f /usr/bin/update-mime-database && /usr/bin/update-mime-database %{_datadir}/mime > /dev/null || :
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.gtk2 && SuSEconfig --module gtk2 > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%post base
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_post
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%postun base
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_postun
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%post calc
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_post
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%postun calc
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_postun
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%post draw
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_post
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%postun draw
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_postun
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%post math
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_post
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%postun math
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_postun
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%post impress
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_post
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%postun impress
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_postun
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%post writer
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_post
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%postun writer
|
||||
%if %suse_version > 1130
|
||||
%desktop_database_postun
|
||||
%else
|
||||
test -f /usr/bin/update-desktop-database && /usr/bin/update-desktop-database > /dev/null || :
|
||||
test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null || :
|
||||
%endif
|
||||
|
||||
%_link_noarch_files icon-theme-crystal
|
||||
%_link_noarch_files icon-theme-galaxy
|
||||
|
@ -1,93 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
usage() {
|
||||
echo "This script (un)links or unlinks the given to/from libreoffice home"
|
||||
echo
|
||||
echo "Usage: ${0##*/} [--unlink] filelist"
|
||||
}
|
||||
|
||||
change_linking() {
|
||||
local libdir="$1"
|
||||
local filelist="$2"
|
||||
local linkfile=""
|
||||
local linkdir=""
|
||||
|
||||
# Decide if we are linking or wiping first
|
||||
if ${link_mode}; then
|
||||
# Grab all files from the proper folder
|
||||
for file in `cat ${filelist} | grep "/usr/share/libreoffice" | sort`; do
|
||||
# if we get ourselves folder then just create it
|
||||
# it might not be around so lets be safe
|
||||
if [[ -d "${file}" ]] ; then
|
||||
dirname="${file/${datadir}/${libdir}}"
|
||||
# if the location is already there skip it
|
||||
if [[ ! -e "${dirname}" ]]; then
|
||||
mkdir -p "${dirname}"
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
linkfile="${file/${datadir}/${libdir}}"
|
||||
# if the file is already there, skip it
|
||||
# this is true when the parent folder is link
|
||||
if [[ ! -e "${linkfile}" ]]; then
|
||||
ln -sf "${file}" "${linkfile}" || exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
# first just remove the symlinks
|
||||
for file in `cat ${filelist} | grep "/usr/share/libreoffice" | sort`; do
|
||||
linkfile=${file/${datadir}/${libdir}}
|
||||
if [[ -L "${linkfile}" && ! -r "${linkfile}" && ! -d "${linkfile}" ]]; then
|
||||
rm -f "${linkfile}" || exit 1
|
||||
fi
|
||||
done
|
||||
# continue by wiping out all EMPTY dirs
|
||||
# we have to be sure it is not owned by anything else
|
||||
# doing in 2nd run to ensure avoiding collisions
|
||||
for file in `cat ${filelist} | grep "/usr/share/libreoffice" | sort`; do
|
||||
linkdir="${file/${datadir}/${libdir}}"
|
||||
if [[ -d "${linkdir}" && -z `ls "${linkdir}"/*` ]]; then
|
||||
# check if nothing else owns the dir
|
||||
if [[ $(rpm -qf "${file}" 2>/dev/null |wc -l) == 0 ]]; then
|
||||
rmdir "${linkdir}" || exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Global VARS
|
||||
link_mode=true
|
||||
datadir=/usr/share
|
||||
libdirs=(
|
||||
"/usr/lib/"
|
||||
"/usr/lib64/"
|
||||
"/usr/lib32/"
|
||||
)
|
||||
|
||||
if [[ "$1" == "--unlink" ]]; then
|
||||
link_mode=false
|
||||
shift
|
||||
fi
|
||||
|
||||
if [[ "$1" == "--help" ]]; then
|
||||
usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Verify we have just one left argument which is the filelist
|
||||
if [[ $# > 1 || ! -f "$1" ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for libdir in ${libdirs[@]}; do
|
||||
# for each dir verify there is libreoffice folder, otherwise skip
|
||||
if [[ ! -d "${libdir}/libreoffice/" ]]; then
|
||||
continue
|
||||
fi
|
||||
change_linking ${libdir} $1
|
||||
# remove dangling links as they might happen when migratin from older
|
||||
# libreoffice versions
|
||||
find ${libdir}/libreoffice -type l -xtype l -delete
|
||||
done
|
Loading…
Reference in New Issue
Block a user