]> git.pld-linux.org Git - packages/python-skype.git/blob - python-skype.spec
- python 3.6
[packages/python-skype.git] / python-skype.spec
1 %define         module  skype
2 Summary:        Python wrapper for the Skype API
3 Name:           python-%{module}
4 Version:        1.0.32.1
5 Release:        5
6 License:        BSD
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
13 Source3:        skype.py
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
24 Suggests:       python-dbus
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         kde_servicesdir %{_datadir}/services
29
30 %description
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.
34
35 %package -n kde-protocol-skype
36 Summary:        KDE3/KDE4 protocol handler
37 Group:          Applications/Communications
38 Requires:       %{name} = %{version}-%{release}
39
40 %description -n kde-protocol-skype
41 KDE3/KDE4 "skype:" protocol handler.
42
43 %package -n gnome-urlhandler-skype
44 Summary:        Gnome URL handler for "skype:" protocol
45 Group:          Applications/Communications
46 Requires:       %{name} = %{version}-%{release}
47
48 %description -n gnome-urlhandler-skype
49 Gnome URL handler for "skype:" protocol.
50
51 %prep
52 %setup -q -n Skype4Py-%{version} -c
53 mv *-skype4py-*/* .
54
55 %patch0 -p0 -R
56 %patch1 -p1
57 %undos -f py
58
59 mv Skype4Py/LICENSE .
60
61 cp -p %{SOURCE1} examples/chat.py
62
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";
66 done > lang.py
67 cp -p lang.py Skype4Py/lang/__init__.py
68
69 %build
70 %py_build
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 %py_install
75
76 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
77 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
78 %py_postclean
79
80 # demo
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
83
84 # kde
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
88
89 # gnome
90 install -d $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas
91 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas
92
93 # ???
94 rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/Skype4Py/lang/x1.py[co]
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post -n gnome-urlhandler-skype
100 %gconf_schema_install skype.schemas
101
102 %preun -n gnome-urlhandler-skype
103 %gconf_schema_uninstall skype.schemas
104
105 %files
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]
114
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]
143
144 %{py_sitescriptdir}/Skype4Py-*.egg-info
145
146 %{_examplesdir}/%{name}-%{version}
147
148 # urlhandler
149 %attr(755,root,root) %{_datadir}/skype/skype.py
150
151 %files -n kde-protocol-skype
152 %defattr(644,root,root,755)
153 %{kde_servicesdir}/skype.protocol
154
155 %files -n gnome-urlhandler-skype
156 %defattr(644,root,root,755)
157 %{_sysconfdir}/gconf/schemas/skype.schemas
This page took 0.036972 seconds and 3 git commands to generate.