[packages/gitter] add desktop integration

glen glen at pld-linux.org
Fri Sep 25 17:50:01 CEST 2015


commit a0d62dcee4017983cc34e82fb1fc1eec038eb258
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Sep 25 18:49:43 2015 +0300

    add desktop integration

 desktop.patch | 13 +++++++++++++
 gitter.spec   | 20 ++++++++++++++++++--
 2 files changed, 31 insertions(+), 2 deletions(-)
---
diff --git a/gitter.spec b/gitter.spec
index 8b5e81f..9002bb1 100644
--- a/gitter.spec
+++ b/gitter.spec
@@ -1,13 +1,17 @@
 Summary:	Instant messaging and chat room system for developers and users of GitHub repositories
 Name:		gitter
 Version:	2.4.0
-Release:	0.2
+Release:	0.3
 License:	unknown
 Group:		X11/Applications/Networking
 Source0:	https://update.gitter.im/linux64/%{name}_%{version}_amd64.deb
 # NoSource0-md5:	8bcf9ce074a7e191cf3070724dc7e525
 NoSource:	0
+Patch0:		desktop.patch
 URL:		https://gitter.im/
+BuildRequires:	rpmbuild(macros) >= 1.596
+Requires:	desktop-file-utils
+Requires:	gtk-update-icon-cache
 ExclusiveArch:	%{ix86} %{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -35,6 +39,8 @@ test $version = %{version}
 
 mv opt/Gitter/linux*/* .
 
+%patch0 -p1
+
 %build
 # chrome official rpm just add libudev.so.0 -> libudev.so.1 symlink, so we use similar hack here
 if [ ! -f Gitter.patched ] && grep -qE "libudev\.so\.0" Gitter; then
@@ -47,20 +53,30 @@ fi
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir}}
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_desktopdir},%{_pixmapsdir}}
 
 cp -a locales $RPM_BUILD_ROOT%{_appdir}
 install -p Gitter $RPM_BUILD_ROOT%{_appdir}
 install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_appdir}
 cp -p *.dat *.pak $RPM_BUILD_ROOT%{_appdir}
 ln -s %{_appdir}/Gitter $RPM_BUILD_ROOT%{_bindir}/%{name}
+cp -p logo.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+cp -p gitter.desktop $RPM_BUILD_ROOT%{_desktopdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%update_desktop_database
+
+%postun
+%update_desktop_database
+
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/gitter
+%{_desktopdir}/gitter.desktop
+%{_pixmapsdir}/gitter.png
 %dir %{_appdir}
 %{_appdir}/locales
 %{_appdir}/icudtl.dat
diff --git a/desktop.patch b/desktop.patch
new file mode 100644
index 0000000..b18d774
--- /dev/null
+++ b/desktop.patch
@@ -0,0 +1,13 @@
+--- gitter-2.4.0/gitter.desktop~	2015-09-04 15:28:05.000000000 +0300
++++ gitter-2.4.0/gitter.desktop	2015-09-25 18:46:26.556325659 +0300
+@@ -1,8 +1,8 @@
+ [Desktop Entry]
+ Name=Gitter
+ Comment=Where developers come to talk
+-Exec=/opt/Gitter/linux64/Gitter
+-Icon=/opt/Gitter/linux64/logo.png
++Exec=gitter
++Icon=gitter
+ Terminal=false
+ Type=Application
+ Categories=Utility;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gitter.git/commitdiff/a0d62dcee4017983cc34e82fb1fc1eec038eb258



More information about the pld-cvs-commit mailing list