[packages/skype] add skype wrapper script
glen
glen at pld-linux.org
Mon Aug 27 03:04:17 CEST 2012
commit 74845f76e8d7572c43fb9274d7e3ef70a86056a0
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Aug 27 04:03:41 2012 +0300
add skype wrapper script
- prefers XDG dirs on new installs
- allows setup env vars prior startup
skype.sh | 19 +++++++++++++++++++
skype.spec | 9 ++++++---
2 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/skype.spec b/skype.spec
index 6a340d3..05db081 100644
--- a/skype.spec
+++ b/skype.spec
@@ -6,13 +6,14 @@ Summary: p2p VoIP application
Summary(pl.UTF-8): Aplikacja VoIP p2p
Name: skype
Version: 4.0.0.8
-Release: 1
+Release: 2
# http://www.skype.com/company/legal/promote/distributionterms.html
# distributing on CD-ROM and similar media requires approval
License: Commercial, redistributable (see LICENSE)
Group: Applications/Communications
Source0: http://download.skype.com/linux/%{pkgname}-ubuntu_%{version}-1_i386.deb
# Source0-md5: d5990641c3c6d17b5a656e5b4aa90ad7
+Source1: %{name}.sh
Patch0: %{name}-desktop.patch
URL: http://www.skype.com/
BuildRequires: rpm-utils
@@ -68,9 +69,10 @@ mv usr/share/applications/skype.desktop .
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{pkgname},%{_datadir}/%{pkgname}/{lang,sounds,avatars},%{_desktopdir},%{_pixmapsdir},/etc/dbus-1/system.d}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir}/%{pkgname},%{_datadir}/%{pkgname}/{lang,sounds,avatars},%{_desktopdir},%{_pixmapsdir},/etc/dbus-1/system.d}
-install -p %{pkgname} $RPM_BUILD_ROOT%{_bindir}
+install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
+install -p %{pkgname} $RPM_BUILD_ROOT%{_libdir}/%{name}
cp -p sounds/*.wav $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/sounds
cp -p lang/*.qm $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/lang
cp -p avatars/*.png $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/avatars
@@ -86,6 +88,7 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
/etc/dbus-1/system.d/skype.conf
%attr(755,root,root) %{_bindir}/skype
+%attr(755,root,root) %{_libdir}/skype
%dir %{_datadir}/%{pkgname}
%{_datadir}/%{pkgname}/sounds
diff --git a/skype.sh b/skype.sh
new file mode 100755
index 0000000..58bab50
--- /dev/null
+++ b/skype.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Legacy dir
+SKYPE_DIR="$HOME/.Skype"
+
+# XDG path
+if [ ! -d "$SKYPE_DIR" ]; then
+ SKYPE_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/Skype"
+fi
+
+if [ ! -d "$SKYPE_DIR" ]; then
+ install -d "$SKYPE_DIR"
+fi
+
+if [ -f "$SKYPE_DIR/env" ]; then
+ . "$SKYPE_DIR/env"
+fi
+
+exec /usr/lib/skype --dbpath="$SKYPE_DIR" "$@"
More information about the pld-cvs-commit
mailing list