- desktop.attr should be reenabled in rpm again

OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/update-desktop-files?expand=0&rev=33
This commit is contained in:
Stephan Kulow 2011-12-15 12:48:54 +00:00 committed by Git OBS Bridge
parent 065e41031d
commit c673b3f4ef
4 changed files with 6 additions and 25 deletions

View File

@ -1,2 +0,0 @@
%__desktop_provides %{_rpmconfigdir}/mimetypes.prov
%__desktop_path .*\\.desktop$

View File

@ -1,19 +0,0 @@
#!/bin/sh
# vim: sw=4 et
# Transform desktop mimetype info into RPM provides
OLD_IFS="$IFS"
while read instfile ; do
case "$instfile" in
*.desktop)
if grep '^Type *= *Application' "$instfile" >/dev/null 2>&1 ; then
mime=$(sed -re '/^MimeType *= *([a-zA-Z0-9. _/;-]*)/!d' $instfile | cut -d'=' -f2)
IFS=';'
for type in $mime ; do
echo 'mimehandler('$type')'
done
fi
;;
esac
done
IFS=$OLD_IFS

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Dec 15 12:44:49 UTC 2011 - coolo@suse.com
- desktop.attr should be reenabled in rpm again
-------------------------------------------------------------------
Fri Dec 9 14:26:41 UTC 2011 - coolo@suse.com

View File

@ -26,9 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: suse_update_desktop_file.sh
Source1: map-desktop-category.sh
Source2: macro
Source3: desktop.attr
Source4: brp-trim-desktop.sh
Source100: mimetypes.prov
# This is not true technically, but we do that to make the rpm macros from
# desktop-file-utils available to most packages that ship a .desktop file
# (since they already have a update-desktop-files BuildRequires).
@ -54,9 +52,8 @@ cd %name
%install
mkdir -p $RPM_BUILD_ROOT%_rpmconfigdir
install -m0755 %SOURCE0 %SOURCE1 %SOURCE100 $RPM_BUILD_ROOT%_rpmconfigdir
install -m0755 %SOURCE0 %SOURCE1 $RPM_BUILD_ROOT%_rpmconfigdir
install -m0644 -D %SOURCE2 $RPM_BUILD_ROOT/etc/rpm/macros.%name
install -m0644 -D %SOURCE3 $RPM_BUILD_ROOT%_rpmconfigdir/fileattrs/desktop.attr
install -m0755 -D %SOURCE4 $RPM_BUILD_ROOT/usr/lib/rpm/brp-suse.d/brp-70-trim-desktopfiles
%files