[packages/viber] fix desktop file
glen
glen at pld-linux.org
Tue Jul 8 16:57:22 CEST 2014
commit cbc3cc13f4e6284e0a0d7e22853753a619f50003
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Jul 8 17:57:08 2014 +0300
fix desktop file
desktop.patch | 16 ++++++++++++++++
viber.spec | 16 ++++++++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/viber.spec b/viber.spec
index 4bd634b..8a61dc2 100644
--- a/viber.spec
+++ b/viber.spec
@@ -2,13 +2,16 @@ Summary: Viber - Free Calls and Messages
Name: viber
# Version from About dialog
Version: 3.1.2
-Release: 0.2
+Release: 0.3
License: ?
Group: Applications/Communications
Source0: http://download.cdn.viber.com/cdn/desktop/Linux/%{name}.deb
# NoSource0-md5: 7be88e0d854aa31e0d7dade32a6413a8
NoSource: 0
+Patch0: desktop.patch
URL: http://viber.com/products/linux
+BuildRequires: desktop-file-utils
+Requires: desktop-file-utils
ExclusiveArch: %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -40,10 +43,11 @@ syncs your contacts and messages with your mobile device.
%setup -qcT
ar x %{SOURCE0}
tar xzf data.tar.gz
-
mv .%{_datadir}/* .
mv viber/Viber.sh .
+%patch0 -p1
+
cat <<'EOF' > viber.sh
#!/bin/sh
export LD_LIBRARY_PATH=%{_appdir}:$LD_LIBRARY_PATH
@@ -58,9 +62,17 @@ cp -p applications/viber.desktop $RPM_BUILD_ROOT%{_desktopdir}
cp -p pixmaps/viber.png $RPM_BUILD_ROOT%{_pixmapsdir}
install -p viber.sh $RPM_BUILD_ROOT%{_bindir}/%{name}
+desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
+
%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}/viber
diff --git a/desktop.patch b/desktop.patch
new file mode 100644
index 0000000..2e870e0
--- /dev/null
+++ b/desktop.patch
@@ -0,0 +1,16 @@
+--- viber-3.1.2/applications/viber.desktop~ 2013-10-18 12:34:09.000000000 +0300
++++ viber-3.1.2/applications/viber.desktop 2014-07-08 17:49:30.230714374 +0300
+@@ -1,10 +1,9 @@
+ [Desktop Entry]
+ Name=Viber
+ Comment=Viber VoIP and messenger
+-Exec=/usr/share/viber/Viber.sh
+-Icon=/usr/share/pixmaps/viber.png
++Exec=viber
++Icon=viber
+ Terminal=false
+ Type=Application
+ Encoding=UTF-8
+-Categories=Network;Application;
+-Path=
++Categories=Qt;Network;InstantMessaging;Telephony;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/viber.git/commitdiff/cbc3cc13f4e6284e0a0d7e22853753a619f50003
More information about the pld-cvs-commit
mailing list