2 Summary: Python wrapper for the Skype API
7 Group: Development/Languages/Python
8 #Source0: http://downloads.sourceforge.net/skype4py/Skype4Py-%{version}.tar.gz
9 Source0: https://github.com/glensc/skype4py/tarball/master/Skype4Py-%{version}.tar.gz
10 # Source0-md5: a31d4e99cd184ce916345f422d73b310
11 Source1: %{name}-chat.py
12 Source2: skype.protocol
14 Source4: skype.schemas
15 # http://skype4py.svn.sourceforge.net/viewvc/skype4py/Skype4Py/api/posix.py?view=patch&r1=277&r2=276&pathrev=277
16 Patch0: default-transport.patch
17 Patch1: execlp-args.patch
18 URL: http://sourceforge.net/projects/skype4py/
19 BuildRequires: python-devel
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.710
22 Requires: python-modules >= 1:2.5
23 Requires: skype-program
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define kde_servicesdir %{_datadir}/services
31 Skype4Py is a Python wrapper for the Skype API. It is platform
32 independant, written completly in Python and reimplements the
33 Skype4COM's API in a Pythonic way.
35 %package -n kde-protocol-skype
36 Summary: KDE3/KDE4 protocol handler
37 Group: Applications/Communications
38 Requires: %{name} = %{version}-%{release}
40 %description -n kde-protocol-skype
41 KDE3/KDE4 "skype:" protocol handler.
43 %package -n gnome-urlhandler-skype
44 Summary: Gnome URL handler for "skype:" protocol
45 Group: Applications/Communications
46 Requires: %{name} = %{version}-%{release}
48 %description -n gnome-urlhandler-skype
49 Gnome URL handler for "skype:" protocol.
52 %setup -q -n Skype4Py-%{version} -c
61 cp -p %{SOURCE1} examples/chat.py
63 # wrap each language import so any language becames optional
64 for lang in $(awk '/^import/{print $2}' Skype4Py/lang/__init__.py | sort -u); do
65 printf "try:\n import $lang\nexcept ImportError:\n pass\n";
67 cp -p lang.py Skype4Py/lang/__init__.py
73 rm -rf $RPM_BUILD_ROOT
76 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
77 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
85 install -d $RPM_BUILD_ROOT{%{kde_servicesdir},%{_datadir}/skype}
86 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{kde_servicesdir}
87 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/skype
90 install -d $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas
91 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas
94 rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/Skype4Py/lang/x1.py[co]
97 rm -rf $RPM_BUILD_ROOT
99 %post -n gnome-urlhandler-skype
100 %gconf_schema_install skype.schemas
102 %preun -n gnome-urlhandler-skype
103 %gconf_schema_uninstall skype.schemas
106 %defattr(644,root,root,755)
107 %doc README LICENSE ChangeLog
108 %dir %{py_sitescriptdir}/Skype4Py
109 %{py_sitescriptdir}/Skype4Py/*.py[co]
110 %dir %{py_sitescriptdir}/Skype4Py/api
111 %{py_sitescriptdir}/Skype4Py/api/*.py[co]
112 %dir %{py_sitescriptdir}/Skype4Py/lang
113 %{py_sitescriptdir}/Skype4Py/lang/__init__.py[co]
115 %lang(ar) %{py_sitescriptdir}/Skype4Py/lang/ar.py[co]
116 %lang(bg) %{py_sitescriptdir}/Skype4Py/lang/bg.py[co]
117 %lang(cs) %{py_sitescriptdir}/Skype4Py/lang/cs.py[co]
118 %lang(cz) %{py_sitescriptdir}/Skype4Py/lang/cz.py[co]
119 %lang(da) %{py_sitescriptdir}/Skype4Py/lang/da.py[co]
120 %lang(de) %{py_sitescriptdir}/Skype4Py/lang/de.py[co]
121 %lang(el) %{py_sitescriptdir}/Skype4Py/lang/el.py[co]
122 %lang(en) %{py_sitescriptdir}/Skype4Py/lang/en.py[co]
123 %lang(es) %{py_sitescriptdir}/Skype4Py/lang/es.py[co]
124 %lang(et) %{py_sitescriptdir}/Skype4Py/lang/et.py[co]
125 %lang(fi) %{py_sitescriptdir}/Skype4Py/lang/fi.py[co]
126 %lang(fr) %{py_sitescriptdir}/Skype4Py/lang/fr.py[co]
127 %lang(he) %{py_sitescriptdir}/Skype4Py/lang/he.py[co]
128 %lang(hu) %{py_sitescriptdir}/Skype4Py/lang/hu.py[co]
129 %lang(it) %{py_sitescriptdir}/Skype4Py/lang/it.py[co]
130 %lang(ja) %{py_sitescriptdir}/Skype4Py/lang/ja.py[co]
131 %lang(ko) %{py_sitescriptdir}/Skype4Py/lang/ko.py[co]
132 %lang(lt) %{py_sitescriptdir}/Skype4Py/lang/lt.py[co]
133 %lang(lv) %{py_sitescriptdir}/Skype4Py/lang/lv.py[co]
134 %lang(nl) %{py_sitescriptdir}/Skype4Py/lang/nl.py[co]
135 %lang(no) %{py_sitescriptdir}/Skype4Py/lang/no.py[co]
136 %lang(pl) %{py_sitescriptdir}/Skype4Py/lang/pl.py[co]
137 %lang(pp) %{py_sitescriptdir}/Skype4Py/lang/pp.py[co]
138 %lang(pt) %{py_sitescriptdir}/Skype4Py/lang/pt.py[co]
139 %lang(ro) %{py_sitescriptdir}/Skype4Py/lang/ro.py[co]
140 %lang(ru) %{py_sitescriptdir}/Skype4Py/lang/ru.py[co]
141 %lang(sv) %{py_sitescriptdir}/Skype4Py/lang/sv.py[co]
142 %lang(tr) %{py_sitescriptdir}/Skype4Py/lang/tr.py[co]
144 %{py_sitescriptdir}/Skype4Py-*.egg-info
146 %{_examplesdir}/%{name}-%{version}
149 %attr(755,root,root) %{_datadir}/skype/skype.py
151 %files -n kde-protocol-skype
152 %defattr(644,root,root,755)
153 %{kde_servicesdir}/skype.protocol
155 %files -n gnome-urlhandler-skype
156 %defattr(644,root,root,755)
157 %{_sysconfdir}/gconf/schemas/skype.schemas