1 %define module python-gammu
2 Summary: Python bindings for Gammu library.
7 Group: Development/Languages/Python
8 Source0: http://dl.cihar.com/python-gammu/%{module}-%{version}.tar.bz2
9 # Source0-md5: e92b13cb6fa9681c48981340ffadd251
10 URL: http://http://wammu.eu/python-gammu/
11 BuildRequires: gammu-devel >= 1.34.0
12 BuildRequires: python-devel
13 BuildRequires: rpm-pythonprov
14 BuildRequires: rpmbuild(macros) >= 1.219
15 Requires: glibc >= 2.4
16 Requires: python-modules
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Python bindings for Gammu library.
23 %setup -q -n %{module}-%{version}
26 export CFLAGS="%{rpmcflags}"
27 %{__python} setup.py build
30 rm -rf $RPM_BUILD_ROOT
31 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
32 %{__python} setup.py install \
34 --root=$RPM_BUILD_ROOT
36 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
37 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
40 install examples/data/*.* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/data
41 install examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
42 #install examples/data/*.* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/data
45 rm -rf $RPM_BUILD_ROOT
48 %defattr(644,root,root,755)
49 %dir %{py_sitedir}/gammu
50 %attr(755,root,root) %{py_sitedir}/gammu/*.so
51 %{py_sitedir}/gammu/*.py[co]
52 %{py_sitedir}/python_gammu-%{version}-py*.egg-info
53 %{_examplesdir}/%{name}-%{version}