5 %define python_gammu_req
0.20
7 %if %{!?py_ver:1}0 == 10
8 %define py_ver %
(python
-c "import sys
; v
=sys.version_info
[:2]; print '%
%d.%
%d'%
%v"
2>/dev
/null ||
echo PYTHON
-NOT
-FOUND
)
11 %define py_minver
%py_ver
12 %define py_maxver %
(python
-c "import sys
; a
,b
=sys.version_info
[:2]; print '%
%d.%
%d'%%
(a
,b
+1)"
2>/dev
/null ||
echo PYTHON
-NOT
-FOUND
)
14 Summary: Mobile phone manager
18 Source0: %{name}-%{version}.tar.bz2
20 %if %_vendor == "suse"
21 Group: Hardware
/Mobile
23 Group: Applications
/Communications
25 Packager: Michal Cihar
<michal@cihar.com
>
26 Vendor: Michal Cihar
<michal@cihar.com
>
29 # /usr/bin/pycrust is here for make vendor independant dependancy on wxPython.
30 # If you know better way, please let me know.
31 Requires: /usr
/bin
/pycrust
, python
-gammu
>= %{python_gammu_req}
32 BuildRequires
: python
, python
-devel
33 Requires: python
>= %py_minver, python
< %py_maxver
36 Buildroot: %{_tmppath}/%name-%version-root
39 Mobile phone manager using Gammu as it's backend. It works with any phone Gammu
40 supports
- many Nokias
, Siemens
, Alcatel
, ... Written using wxGTK.
46 CFLAGS
="$RPM_OPT_FLAGS" python setup.py build
--skip
-deps
49 python setup.py
install --skip
-deps
--root
=$RPM_BUILD_ROOT
--record
=INSTALLED_FILES
50 sed
-i '
/man1
/ D' INSTALLED_FILES
51 %if %_vendor == "redhat"
52 # Dirty hack: on Fedora, the .pyo files don't get written to
53 # INSTALLED_FILES, so put them there manually (this should also be
54 # safe on systems where this works correctly, as we remove
56 grep '\.pyc$' INSTALLED_FILES | sed 's
/\.pyc
/.pyo
/g'
>> INSTALLED_FILES.tmp
57 cat INSTALLED_FILES
>> INSTALLED_FILES.tmp
58 sort
-u INSTALLED_FILES.tmp
> INSTALLED_FILES
59 rm -f INSTALLED_FILES.tmp
64 rm -rf $RPM_BUILD_ROOT
66 %files -f INSTALLED_FILES
68 %doc README AUTHORS FAQ COPYING NEWS
69 %doc %{_mandir}/man1
/*