[leksah/f14] Fix #744559 modified: leksah.desktop modified: leksah.spec new file: leksah.xml new file:

Lakshmi Narasimhan T V narasim at fedoraproject.org
Mon Oct 10 14:21:23 UTC 2011


commit 75d6770e1052ce80fc9f0929eba4fc90fbf151d6
Author: Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com>
Date:   Mon Oct 10 19:49:49 2011 +0530

    Fix #744559
    	modified:   leksah.desktop
    	modified:   leksah.spec
    	new file:   leksah.xml
    	new file:   leksah_loadsession.desktop

 leksah.desktop             |    7 +++--
 leksah.spec                |   22 ++++++++++++++++----
 leksah.xml                 |   45 ++++++++++++++++++++++++++++++++++++++++++++
 leksah_loadsession.desktop |   12 +++++++++++
 4 files changed, 78 insertions(+), 8 deletions(-)
---
diff --git a/leksah.desktop b/leksah.desktop
index e179cca..d39462e 100644
--- a/leksah.desktop
+++ b/leksah.desktop
@@ -1,10 +1,11 @@
+
 [Desktop Entry]
 Encoding=UTF-8
 Name=Leksah
 GenericName=Haskell IDE
 Comment=The Haskell development environment
-Exec=leksah %F
+Exec=leksah -d %F
 Icon=leksah
 Type=Application
-Categories=GNOME;GTK;Development;
-MimeType=text/x-haskell;text/x-literate-haskell;application/leksah-session;application/leksah-workspace
+Categories=GNOME;GTK;Development;X-DevelopmentTools;
+MimeType=text/x-haskell;text/x-literate-haskell;
diff --git a/leksah.spec b/leksah.spec
index cfaccbf..da902a6 100644
--- a/leksah.spec
+++ b/leksah.spec
@@ -16,7 +16,7 @@ Haskell written in Haskell. Leksah uses GTK+ as GUI Toolkit.
 
 Name:           %{pkg_name}
 Version:        0.10.0.4
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Haskell IDE
 Group:          Development/Tools
 # LICENSE file is GPLv2 while sources only mention GPL, hence GPL+.
@@ -25,6 +25,8 @@ URL:            http://hackage.haskell.org/package/%{name}
 # all sources
 Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
 Source1:        %{name}.desktop
+Source2:        %{name}_loadsession.desktop
+Source3:        %{name}.xml
 # arches
 ExclusiveArch:  %{ghc_arches}
 BuildRequires:  ghc-Cabal-devel
@@ -33,7 +35,6 @@ BuildRequires:  hscolour
 BuildRequires :  ghc-Cabal-prof, ghc-directory-prof, ghc-gtksourceview2-prof, ghc-old-time-prof, ghc-process-leksah-prof, ghc-regex-tdfa-prof, ghc-utf8-string-prof, ghc-time-prof, ghc-ltk-prof, ghc-binary-shared-prof, ghc-deepseq-prof, ghc-hslogger-prof, ghc-leksah-server-prof, ghc-network-prof, ghc-ghc-prof, ghc-strict-prof
 BuildRequires: desktop-file-utils
 # all requires list
-Requires: shared-mime-info
 Requires: hicolor-icon-theme
 Requires: leksah-server
 
@@ -60,7 +61,10 @@ Patch1 : leksah_dep.patch
 mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/128x128/apps
 install --mode=0644 -D pics/leksah.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/128x128/apps/leksah.png
 desktop-file-install --add-category="Development"  --add-category="X-DevelopmentTools" --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
-
+desktop-file-install --add-category="Development"  --add-category="X-DevelopmentTools" --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
+# Copy mime file
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mime/packages
+install --mode=0644 -D %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/mime/packages
 
 # define the shared, devel and prof subpkgs, devel scripts,
 # and filelists: ghc-leksah.files, ghc-leksah-devel.files
@@ -79,12 +83,15 @@ desktop-file-install --add-category="Development"  --add-category="X-Development
 %attr(644,root,root) %{_datadir}/%{name}-%{version}/pics/*
 %attr(644,root,root) %{_datadir}/%{name}-%{version}/data/*
 %attr(644,root,root) %{_datadir}/applications/%{name}.desktop
+%attr(644,root,root) %{_datadir}/applications/%{name}_loadsession.desktop
+%attr(644,root,root) %{_datadir}/mime/packages/leksah.xml
 %attr(644,root,root) %{_datadir}/icons/hicolor/128x128/apps/leksah.png
 
 
 %post
 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-update-desktop-database &> /dev/null || :
+/usr/bin/update-desktop-database &> /dev/null || :
+/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
 
 
 %postun
@@ -92,7 +99,8 @@ if [ $1 -eq 0 ] ; then
     touch --no-create %{_datadir}/icons/hicolor &>/dev/null
     gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
-update-desktop-database &> /dev/null || :
+/usr/bin/update-desktop-database &> /dev/null || :
+/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
 
 
 %posttrans
@@ -100,6 +108,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Mon Oct 10 2011 Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com> - 0.10.0.4-4
+- Fix bug 744559.
+- Added leksah.xml to mime database.
+
 * Sat Jul 2 2011 Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com> - 0.10.0.4-3
 - Added license comment before License field.
 - Fixed vertical spacing.
diff --git a/leksah.xml b/leksah.xml
new file mode 100644
index 0000000..1af0abc
--- /dev/null
+++ b/leksah.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+<mime-type type="application/leksah-session">
+<comment>leksah session file</comment>
+<glob pattern="*.lkshs"/>
+</mime-type>
+
+<mime-type type="application/leksah-workspace">
+<comment>leksah workspace file</comment>
+<glob pattern="*.lkshw"/>
+<generic-icon name="application-x-leksah"/>
+</mime-type>
+
+<mime-type type="text/leksah-preferences">
+<comment>leksah preferences file</comment>
+<glob pattern="*.lkshp"/>
+</mime-type>
+
+<mime-type type="text/leksah-candy">
+<comment>leksah candy file</comment>
+<glob pattern="*.lkshc"/>
+</mime-type>
+
+<mime-type type="text/leksah-keymap">
+<comment>leksah keymap file</comment>
+<glob pattern="*.lkshk"/>
+</mime-type>
+
+<mime-type type="x-contents/leksah-metadata">
+<comment>leksah metadata file</comment>
+<glob pattern="*.lkshm"/>
+</mime-type>
+
+<mime-type type="text/leksah-metadata-path">
+<comment>leksah metadata file</comment>
+<glob pattern="*.lkshp"/>
+
+</mime-type>
+
+<mime-type type="x-contents/leksah-metadata-ws">
+<comment>leksah workspace metadata file</comment>
+<glob pattern="*.lkshe"/>
+</mime-type>
+
+</mime-info>
diff --git a/leksah_loadsession.desktop b/leksah_loadsession.desktop
new file mode 100644
index 0000000..4f71c8a
--- /dev/null
+++ b/leksah_loadsession.desktop
@@ -0,0 +1,12 @@
+
+[Desktop Entry]
+Encoding=UTF-8
+Name=Leksah
+GenericName=Haskell IDE
+Comment=The Haskell development environment
+NoDisplay=true
+Exec=leksah %f
+Icon=leksah
+Type=Application
+Categories=GNOME;GTK;Development;X-DevelopmentTools;
+MimeType=application/leksah-session;application/leksah-workspace;


More information about the scm-commits mailing list