[packages/sublime-text: 4/4] install desktop file
glen
glen at pld-linux.org
Mon Dec 2 23:47:18 CET 2013
commit b954115ea9da69ccd693d02178f84a0484c7e8f6
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Dec 3 00:43:54 2013 +0200
install desktop file
extracted from nightly rpm
http://repo.cloudhike.com/sublime2_nightly/fedora/18/x86_64/RPMS/sublime-text-2219-1.fc18.x86_64.rpm
sublime-text.spec | 7 +++++++
sublime_text.desktop | 10 ++++++++++
2 files changed, 17 insertions(+)
---
diff --git a/sublime-text.spec b/sublime-text.spec
index 2171377..f5f0a46 100644
--- a/sublime-text.spec
+++ b/sublime-text.spec
@@ -10,7 +10,9 @@ NoSource: 0
Source1: http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20%{version}%20x64.tar.bz2
# NoSource1-md5: 699cd26d7fe0bada29eb1b2cd7b50e4b
NoSource: 1
+Source2: sublime_text.desktop
URL: http://www.sublimetext.com/
+Requires: desktop-file-utils
Requires: gtk-update-icon-cache
Requires: hicolor-icon-theme
ExclusiveArch: %{ix86} %{x8664}
@@ -42,6 +44,8 @@ ln -s %{_appdir}/%{name} $RPM_BUILD_ROOT%{_bindir}/sublime
%py_ocomp $RPM_BUILD_ROOT%{_appdir}
%py_comp $RPM_BUILD_ROOT%{_appdir}
+install -d $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
for dir in Icon/*; do
size=${dir#Icon/}
install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/$size/apps
@@ -52,9 +56,11 @@ done
rm -rf $RPM_BUILD_ROOT
%post
+%update_desktop_database
%update_icon_cache hicolor
%postun
+%update_desktop_database
%update_icon_cache hicolor
%files
@@ -69,4 +75,5 @@ rm -rf $RPM_BUILD_ROOT
%{_appdir}/Pristine?Packages
%dir %{_appdir}/lib
%{_appdir}/lib/python26.zip
+%{_desktopdir}/sublime_text.desktop
%{_iconsdir}/hicolor/*/apps/sublime_text.png
diff --git a/sublime_text.desktop b/sublime_text.desktop
new file mode 100644
index 0000000..f8ed8b8
--- /dev/null
+++ b/sublime_text.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Sublime2
+GenericName=Sublime 2 Text
+Comment=Text editor
+Exec=sublime
+Icon=sublime_text
+Terminal=false
+Type=Application
+Categories=Development;TextEditor;
+StartupNotify=true
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sublime-text.git/commitdiff/b954115ea9da69ccd693d02178f84a0484c7e8f6
More information about the pld-cvs-commit
mailing list