Merge from pootle.
[wammu.git] / wammu.spec
blobd73cd0995cc1e163145bc9854226dfcd6a3f216c
1 %define name wammu
2 %define ver 0.30
3 %define rel 1
4 %define extension bz2
6 %define python_gammu_req 0.24
8 %{!?__python: %define __python python}
9 %define wammu_python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
11 Summary: Mobile phone manager
12 Name: %{name}
13 Version: %{ver}
14 Release: %{rel}
15 Source: http://dl.cihar.com/%{name}/latest/%{name}-%{ver}.tar.%{extension}
16 License: GPLv2
17 %if 0%{?suse_version}
18 Group: Hardware/Mobile
19 %else
20 Group: Applications/Communications
21 %endif
22 Vendor: Michal Čihař <michal@cihar.com>
24 Requires: wxPython >= 2.6, python-gammu >= %{python_gammu_req}, python-xml
25 BuildRequires: python-devel
26 %if 0%{?suse_version}
27 BuildRequires: update-desktop-files
28 %endif
29 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
30 BuildRequires: desktop-file-utils
31 %endif
32 %{?py_requires}
34 Url: http://wammu.eu/
35 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
36 # These distributions use /usr/lib for python on all architectures
37 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} || 0%{?mandriva_version}
38 BuildArch: noarch
39 %endif
41 %description
42 It works with any phone that Gammu supports, including many models from
43 Nokia, Siemens, and Alcatel. It has complete support (read, edit,
44 delete, copy) for contacts, todo, and calendar. It can read, save, and
45 send SMS. It includes an SMS composer for multi-part SMS messages, and
46 it can display SMS messages that include pictures. Currently, only text
47 and predefined bitmaps or sounds can be edited in the SMS composer. It
48 can export messages to an IMAP4 server (or other email storage).
50 This program does not support browsing files in phone, use gMobileMedia
51 instead.
54 %prep
55 %setup -q
57 %build
58 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build --skip-deps
60 %install
61 rm -rf %buildroot
62 mkdir %buildroot
63 %{__python} setup.py install --skip-build --root=%buildroot --prefix=%{_prefix}
64 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
65 %{__python} setup.py install -O1 --skip-build --root=%buildroot --prefix=%{_prefix}
66 %endif
67 %find_lang %{name}
68 %if 0%{?suse_version}
69 %suse_update_desktop_file %{name}
70 %endif
71 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
72 desktop-file-install --vendor "" \
73 --dir %buildroot%{_datadir}/applications \
74 --mode 0644 \
75 --remove-category=Application \
76 %buildroot%{_datadir}/applications/%{name}.desktop
77 %endif
79 %clean
80 rm -rf %buildroot
82 %files -f %name.lang
83 %defattr(-,root,root)
84 %doc COPYING AUTHORS FAQ README PKG-INFO ChangeLog
85 %doc %{_mandir}/man1/*
86 %{_bindir}/%{name}
87 %{_bindir}/%{name}-configure
88 %{_datadir}/Wammu
89 %{_datadir}/pixmaps/*
90 %{_datadir}/applications/%{name}.desktop
91 %{wammu_python_sitelib}/*
93 %changelog
94 * Fri Oct 24 2008 Michal Čihař <michal@cihar.com> - 0.29-1
95 - fixed according to Fedora policy
97 * Wed Oct 8 2008 michal@cihar.com
98 - do not make it noarch package because it is sometimes in lib64 dir
99 * Mon Jan 05 2004 michal@cihar.com
100 - initial packaging
101 - see SVN log for changelog