[leksah/f16] Fix #744559

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


commit c8d2a3582de44e3023a2d6f2919949428f5dc575
Author: Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com>
Date:   Mon Oct 10 19:44:11 2011 +0530

    Fix #744559

 leksah.desktop |    7 ++++---
 leksah.spec    |   22 +++++++++++++++++-----
 2 files changed, 21 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.


More information about the scm-commits mailing list