Translated using Weblate.
[wammu.git] / wammu.spec
blobdd9865f9002c81c25a12eca673b66de4e4004061
1 Name: wammu
2 Version: 0.37
3 Release: 1
5 %define extension bz2
7 %define python_gammu_req 0.24
9 %{!?__python: %define __python python}
10 %define wammu_python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
12 Summary: Mobile phone manager
13 Source: http://dl.cihar.com/%{name}/latest/%{name}-%{version}.tar.%{extension}
14 License: GPLv2
15 %if 0%{?suse_version}
16 Group: Hardware/Mobile
17 %else
18 Group: Applications/Communications
19 %endif
20 Vendor: Michal Čihař <michal@cihar.com>
22 Requires: wxPython >= 2.6, python-gammu >= %{python_gammu_req}
23 BuildRequires: python-devel
24 %if 0%{?suse_version}
25 BuildRequires: update-desktop-files
26 %endif
27 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
28 BuildRequires: desktop-file-utils
29 %endif
30 %{?py_requires}
32 Url: http://wammu.eu/
33 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
34 # These distributions use /usr/lib for python on all architectures
35 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} || 0%{?mandriva_version} || 0%{?suse_version} > 1110
36 BuildArch: noarch
37 %endif
39 %description
40 It works with any phone that Gammu supports, including many models from
41 Nokia, Siemens, and Alcatel. It has complete support (read, edit,
42 delete, copy) for contacts, todo, and calendar. It can read, save, and
43 send SMS. It includes an SMS composer for multi-part SMS messages, and
44 it can display SMS messages that include pictures. Currently, only text
45 and predefined bitmaps or sounds can be edited in the SMS composer. It
46 can export messages to an IMAP4 server (or other email storage).
48 This program does not support browsing files in phone, use gMobileMedia
49 instead.
52 %prep
53 %setup -q
54 # Ugly hack for SUSE because it does not like TelephonyTools
55 %if 0%{?suse_version}
56 sed -i 's/TelephonyTools/Telephony/' wammu.desktop.in
57 %endif
60 %build
61 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
63 %install
64 %if 0%{?suse_version} == 0
65 rm -rf %buildroot
66 mkdir %buildroot
67 %endif
68 %{__python} setup.py install --root=%buildroot --prefix=%{_prefix}
69 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
70 %{__python} setup.py install -O1 --root=%buildroot --prefix=%{_prefix}
71 %endif
72 %find_lang %{name}
73 %if 0%{?suse_version}
74 %suse_update_desktop_file %{name}
75 %endif
76 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
77 desktop-file-install --vendor "" \
78 --dir %buildroot%{_datadir}/applications \
79 --mode 0644 \
80 --remove-category=Application \
81 %buildroot%{_datadir}/applications/%{name}.desktop
82 %endif
84 %clean
85 rm -rf %buildroot
87 %files -f %name.lang
88 %defattr(-,root,root)
89 %doc COPYING AUTHORS FAQ README PKG-INFO ChangeLog
90 %doc %{_mandir}/man1/*
91 %lang(cs) %doc %{_mandir}/cs
92 %lang(nl) %doc %{_mandir}/nl
93 %lang(it) %doc %{_mandir}/it
94 %lang(id) %doc %{_mandir}/id
95 %lang(sk) %doc %{_mandir}/sk
96 %lang(de) %doc %{_mandir}/de
97 %lang(fr) %doc %{_mandir}/fr
98 %lang(ru) %doc %{_mandir}/ru
99 %lang(es) %doc %{_mandir}/es
100 %lang(hu) %doc %{_mandir}/hu
101 %lang(pt_BR) %doc %{_mandir}/pt_BR
102 %{_bindir}/%{name}
103 %{_bindir}/%{name}-configure
104 %{_datadir}/Wammu
105 %{_datadir}/pixmaps/*
106 %{_datadir}/applications/%{name}.desktop
107 %{wammu_python_sitelib}/*
109 %changelog
110 * Fri Apr 3 2009 Michal Čihař <michal@cihar.com> - 0.31-1
111 - do not define own %version, %name, %rel
112 - do not delete build root on SUSE
114 * Fri Oct 24 2008 Michal Čihař <michal@cihar.com> - 0.29-1
115 - fixed according to Fedora policy
117 * Wed Oct 8 2008 michal@cihar.com
118 - do not make it noarch package because it is sometimes in lib64 dir
119 * Mon Jan 05 2004 michal@cihar.com
120 - initial packaging
121 - see Git log for changelog