summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-gfx/draftsight-bin/draftsight-bin-1.6.1_beta.ebuild96
1 files changed, 25 insertions, 71 deletions
diff --git a/media-gfx/draftsight-bin/draftsight-bin-1.6.1_beta.ebuild b/media-gfx/draftsight-bin/draftsight-bin-1.6.1_beta.ebuild
index d4d7eef..72ec979 100644
--- a/media-gfx/draftsight-bin/draftsight-bin-1.6.1_beta.ebuild
+++ b/media-gfx/draftsight-bin/draftsight-bin-1.6.1_beta.ebuild
@@ -73,51 +73,24 @@ pkg_postinst() {
elog "xdg-mime default \"dassault-systemes\"_\"draftsight.desktop\" \"application/vnd.dassault-systemes.draftsight-dxf\""
elog "xdg-mime default \"dassault-systemes\"_\"draftsight.desktop\" \"application/vnd.dassault-systemes.draftsight-dwt\""
- local ICON_SIZES="16 32 48 64 128"
-
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
- for size in ${ICON_SIZES} ; do
- xdg-icon-resource install --noupdate --novendor --context mimetypes \
- --mode system --size ${size} \
+ for size in 16 32 48 64 128 ; do
+ local XDG_OPTS="--noupdate --novendor --mode system --size ${size}"
+ xdg-icon-resource install ${XDG_OPTS} --context apps \
"${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/program.png" \
- "application-vnd.dassault-systemes.draftsight-dwg" \
- || die "icon resource installation failed"
- xdg-icon-resource install --noupdate --novendor --theme gnome --context \
- mimetypes --mode system --size ${size} \
+ "dassault-systemes.draftsight"
+ xdg-icon-resource install ${XDG_OPTS} --context apps --theme gnome \
"${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/program.png" \
- "application-vnd.dassault-systemes.draftsight-dwg" \
- || die "icon resource installation failed"
- xdg-icon-resource install --noupdate --novendor --context mimetypes \
- --mode system --size ${size} \
- "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwg.png" \
- "application-vnd.dassault-systemes.draftsight-dwg" \
- || die "icon resource installation failed"
- xdg-icon-resource install --noupdate --novendor --theme gnome --context \
- mimetypes --mode system --size ${size} \
- "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwg.png" \
- "application-vnd.dassault-systemes.draftsight-dwg" \
- || die "icon resource installation failed"
- xdg-icon-resource install --noupdate --novendor --context mimetypes \
- --mode system --size ${size} \
- "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dxf.png" \
- "application-vnd.dassault-systemes.draftsight-dxf" \
- || die "icon resource installation failed"
- xdg-icon-resource install --noupdate --novendor --theme gnome --context \
- mimetypes --mode system --size ${size} \
- "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dxf.png" \
- "application-vnd.dassault-systemes.draftsight-dxf" \
- || die "icon resource installation failed"
- xdg-icon-resource install --noupdate --novendor --context mimetypes \
- --mode system --size ${size} \
- "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwt.png" \
- "application-vnd.dassault-systemes.draftsight-dwt" \
- || die "icon resource installation failed"
- xdg-icon-resource install --noupdate --novendor --theme gnome --context \
- mimetypes --mode system --size ${size} \
- "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwt.png" \
- "application-vnd.dassault-systemes.draftsight-dwt" \
- || die "icon resource installation failed"
+ "dassault-systemes.draftsight"
+ for mimetype in dwg dxf dwt ; do
+ xdg-icon-resource install ${XDG_OPTS} --context mimetypes \
+ "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-${mimetype}.png" \
+ "application-vnd.dassault-systemes.draftsight-${mimetype}"
+ xdg-icon-resource install ${XDG_OPTS} --context mimetypes --theme gnome \
+ "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-${mimetype}.png" \
+ "application-vnd.dassault-systemes.draftsight-${mimetype}"
+ done
done
xdg-icon-resource forceupdate
@@ -125,39 +98,20 @@ pkg_postinst() {
udev_dorules "${FILESDIR}"/10-ft-rockey.rules
}
-pkg_prerm() {
- local ICON_SIZES="16 32 48 64 128"
-
+pkg_postrm() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
- for size in ${ICON_SIZES} ; do
+ for size in 16 32 48 64 128 ; do
xdg-icon-resource uninstall --noupdate --context apps --mode system \
- --size ${size} "dassault-systemes.draftsight" \
- || ewarn "icon uninstall failed"
- xdg-icon-resource uninstall --noupdate --context apps --theme gnome \
- --mode system --size ${size} "dassault-systemes.draftsight" \
- || ewarn "icon uninstall failed"
- xdg-icon-resource uninstall --noupdate --context mimetypes --mode system \
- --size ${size} "application-vnd.dassault-systemes.draftsight-dwg" \
- || ewarn "icon uninstall failed"
- xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome \
- --mode system --size ${size} \
- "application-vnd.dassault-systemes.draftsight-dwg" \
- || ewarn "icon uninstall failed"
- xdg-icon-resource uninstall --noupdate --context mimetypes --mode system \
- --size ${size} "application-vnd.dassault-systemes.draftsight-dxf" \
- || ewarn "icon uninstall failed"
- xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome \
- --mode system --size ${size} \
- "application-vnd.dassault-systemes.draftsight-dxf" \
- || ewarn "icon uninstall failed"
- xdg-icon-resource uninstall --noupdate --context mimetypes --mode system \
- --size ${size} "application-vnd.dassault-systemes.draftsight-dwt" \
- || ewarn "icon uninstall failed"
- xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome \
- --mode system --size ${size} \
- "application-vnd.dassault-systemes.draftsight-dwt" \
- || ewarn "icon uninstall failed"
+ --size ${size} "dassault-systemes.draftsight"
+ xdg-icon-resource uninstall --noupdate --context apps --mode system --theme gnome \
+ --size ${size} "dassault-systemes.draftsight"
+ for mimetype in dwg dxf dwt ; do
+ xdg-icon-resource uninstall --noupdate --context mimetypes --mode system \
+ --size ${size} "application-vnd.dassault-systemes.draftsight-${mimetype}"
+ xdg-icon-resource uninstall --noupdate --context mimetypes --mode system --theme gnome \
+ --size ${size} "application-vnd.dassault-systemes.draftsight-${mimetype}"
+ done
done
xdg-icon-resource forceupdate