Accepting request 508932 from GNOME:Factory
1 OBS-URL: https://build.opensuse.org/request/show/508932 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/shared-mime-info?expand=0&rev=51
This commit is contained in:
commit
4fa4c8f36f
@ -15,27 +15,10 @@
|
||||
#
|
||||
###
|
||||
|
||||
# On install, update the mime database
|
||||
# macros are place holders to not unnescessarily break packages; package converted to file triggers
|
||||
%mime_database_post() \
|
||||
export PKGSYSTEM_ENABLE_FSYNC=0 \
|
||||
if test -x %{_bindir}/update-mime-database; then \
|
||||
%if "x%1" != "x%%1" \
|
||||
%{_bindir}/update-mime-database "%1" || true \
|
||||
%else \
|
||||
%{_bindir}/update-mime-database "%{_datadir}/mime" || true \
|
||||
%endif \
|
||||
fi
|
||||
%nil
|
||||
|
||||
# On uninstall, update the mime database. Note: we ignore upgrades (already
|
||||
# handled in %post of the new package).
|
||||
# macros are place holders to not unnescessarily break packages; package converted to file triggers
|
||||
%mime_database_postun() \
|
||||
export PKGSYSTEM_ENABLE_FSYNC=0 \
|
||||
if [ $1 -eq 0 ]; then \
|
||||
if test -x %{_bindir}/update-mime-database; then \
|
||||
%if "x%1" != "x%%1" \
|
||||
%{_bindir}/update-mime-database "%1" || true \
|
||||
%else \
|
||||
%{_bindir}/update-mime-database "%{_datadir}/mime" || true \
|
||||
%endif \
|
||||
fi \
|
||||
fi
|
||||
%nil
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 27 11:09:32 UTC 2017 - dimstar@opensuse.org
|
||||
|
||||
- Replace %mime_database_post/postun with respective file triggers
|
||||
in shared-mime-info: any file put into /usr/share/mime will
|
||||
trigger the execution of the script. In order to not break the
|
||||
macros short-term they are being redefined to %nil.
|
||||
- Drop redundant %clean section.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 7 11:37:38 UTC 2016 - dimstar@opensuse.org
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package shared-mime-info
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -73,12 +73,13 @@ install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/rpm/macros.shared-mime-info
|
||||
%check
|
||||
make check
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%filetriggerin -- %{_datadir}/mime
|
||||
export PKGSYSTEM_ENABLE_FSYNC=0
|
||||
%{_bindir}/update-mime-database %{_datadir}/mime || true
|
||||
%{_bindir}/update-mime-database "%{_datadir}/mime"
|
||||
|
||||
%filetriggerpostun -- %{_datadir}/mime
|
||||
export PKGSYSTEM_ENABLE_FSYNC=0
|
||||
[ -x %{_bindir}/update-mime-database ] && %{_bindir}/update-mime-database "%{_datadir}/mime"
|
||||
|
||||
%files
|
||||
%defattr (-, root, root)
|
||||
|
Loading…
Reference in New Issue
Block a user