[leksah] 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:26:22 UTC 2011


commit 789ade02ba1d3f7d70829dbc26eb14cd233ee558
Author: Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com>
Date:   Mon Oct 10 19:55:39 2011 +0530

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

 leksah.desktop             |    7 +++--
 leksah.spec                |   23 ++++++++++++++++-----
 leksah.xml                 |   45 ++++++++++++++++++++++++++++++++++++++++++++
 leksah_loadsession.desktop |   12 +++++++++++
 4 files changed, 78 insertions(+), 9 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 10ce20d..6d044ae 100644
--- a/leksah.spec
+++ b/leksah.spec
@@ -13,7 +13,7 @@ Haskell written in Haskell. Leksah uses GTK+ as GUI Toolkit.
 
 Name:           %{pkg_name}
 Version:        0.10.0.4
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Haskell IDE
 Group:          Development/Tools
 # LICENSE file is GPLv2 while sources only mention GPL, hence GPL+.
@@ -21,6 +21,8 @@ License:        GPL+
 URL:            http://hackage.haskell.org/package/%{name}
 Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
 Source1:        %{name}.desktop
+Source2:        %{name}_loadsession.desktop
+Source3:        %{name}.xml
 ExclusiveArch:  %{ghc_arches}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros
@@ -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
 
@@ -94,7 +95,10 @@ This package contains the development files.
 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
 
 %post -n ghc-%{pkg_name}-devel
 %ghc_pkg_recache
@@ -115,6 +119,8 @@ 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
 
 
@@ -128,7 +134,8 @@ desktop-file-install --add-category="Development"  --add-category="X-Development
 
 %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
@@ -136,14 +143,18 @@ 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
 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-6
+- Fix bug 744559.
+- Added leksah.xml to mime database.
+
 * Sun Sep 25 2011  Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com> - 0.10.0.4-5
 - Upgrade to cabal2spec-0.24.1
 - Rebuild for gtk2hs updates
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