use file triggers

f41
David Tardon 9 years ago
parent b48a105c58
commit bd546da497

@ -32,6 +32,7 @@
# default for f23 onwards # default for f23 onwards
%global _hardened_build 1 %global _hardened_build 1
%global weak_deps 1 %global weak_deps 1
%global file_triggers 1
%endif %endif
%global girapiversion 0.1 %global girapiversion 0.1
@ -1870,11 +1871,13 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%{_mandir}/man1/ooffice.1* %{_mandir}/man1/ooffice.1*
%{_mandir}/man1/ooviewdoc.1* %{_mandir}/man1/ooviewdoc.1*
%if ! 0%{?file_triggers}
%post core %post core
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun core %postun core
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%files base %files base
%{baseinstdir}/help/en-US/sdatabase.* %{baseinstdir}/help/en-US/sdatabase.*
@ -1903,11 +1906,13 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{_bindir}/oobase %{_bindir}/oobase
%{_mandir}/man1/oobase.1* %{_mandir}/man1/oobase.1*
%if ! 0%{?file_triggers}
%post base %post base
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun base %postun base
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%files bsh %files bsh
%{baseinstdir}/program/classes/ScriptProviderForBeanShell.jar %{baseinstdir}/program/classes/ScriptProviderForBeanShell.jar
@ -1998,11 +2003,13 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{_bindir}/oocalc %{_bindir}/oocalc
%{_mandir}/man1/oocalc.1* %{_mandir}/man1/oocalc.1*
%if ! 0%{?file_triggers}
%post calc %post calc
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun calc %postun calc
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%files draw %files draw
%{baseinstdir}/help/en-US/sdraw.* %{baseinstdir}/help/en-US/sdraw.*
@ -2014,11 +2021,13 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{_bindir}/oodraw %{_bindir}/oodraw
%{_mandir}/man1/oodraw.1* %{_mandir}/man1/oodraw.1*
%if ! 0%{?file_triggers}
%post draw %post draw
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun draw %postun draw
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%files emailmerge %files emailmerge
%{baseinstdir}/program/mailmerge.py* %{baseinstdir}/program/mailmerge.py*
@ -2043,11 +2052,13 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{_bindir}/oowriter %{_bindir}/oowriter
%{_mandir}/man1/oowriter.1* %{_mandir}/man1/oowriter.1*
%if ! 0%{?file_triggers}
%post writer %post writer
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun writer %postun writer
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%files impress %files impress
%{baseinstdir}/help/en-US/simpress.* %{baseinstdir}/help/en-US/simpress.*
@ -2069,11 +2080,13 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{_bindir}/ooimpress %{_bindir}/ooimpress
%{_mandir}/man1/ooimpress.1* %{_mandir}/man1/ooimpress.1*
%if ! 0%{?file_triggers}
%post impress %post impress
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun impress %postun impress
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%files math %files math
%{baseinstdir}/help/en-US/smath.* %{baseinstdir}/help/en-US/smath.*
@ -2086,11 +2099,13 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{_bindir}/oomath %{_bindir}/oomath
%{_mandir}/man1/oomath.1* %{_mandir}/man1/oomath.1*
%if ! 0%{?file_triggers}
%post math %post math
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun math %postun math
update-desktop-database %{_datadir}/applications &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%files graphicfilter %files graphicfilter
%{baseinstdir}/program/libflashlo.so %{baseinstdir}/program/libflashlo.so
@ -2209,15 +2224,19 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{_datadir}/mime/packages/libreoffice.xml %{_datadir}/mime/packages/libreoffice.xml
%post system-data %post system-data
%if ! 0%{?file_triggers}
touch --no-create %{_datadir}/mime/packages &> /dev/null || : touch --no-create %{_datadir}/mime/packages &> /dev/null || :
%endif
for theme in hicolor locolor; do for theme in hicolor locolor; do
touch --no-create %{_datadir}/icons/$theme &>/dev/null || : touch --no-create %{_datadir}/icons/$theme &>/dev/null || :
done done
%postun system-data %postun system-data
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
%if ! 0%{?file_triggers}
touch --no-create %{_datadir}/mime/packages &> /dev/null || : touch --no-create %{_datadir}/mime/packages &> /dev/null || :
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%endif
for theme in hicolor locolor; do for theme in hicolor locolor; do
touch --no-create %{_datadir}/icons/$theme &>/dev/null || : touch --no-create %{_datadir}/icons/$theme &>/dev/null || :
gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || : gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || :
@ -2225,7 +2244,9 @@ if [ $1 -eq 0 ] ; then
fi fi
%posttrans system-data %posttrans system-data
%if ! 0%{?file_triggers}
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%endif
for theme in hicolor locolor; do for theme in hicolor locolor; do
gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || : gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || :
done done

Loading…
Cancel
Save