This commit is contained in:
committed by
Git OBS Bridge
parent
04560cc328
commit
6acfdbbf1b
249
gammu.spec
249
gammu.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package gammu (Version 1.20.0)
|
||||
# spec file for package gammu (Version 1.23.1)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,51 +15,168 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: gammu
|
||||
Version: 1.20.0
|
||||
Release: 3
|
||||
AutoReqProv: on
|
||||
Group: Hardware/Mobile
|
||||
Version: 1.23.1
|
||||
Release: 1
|
||||
# Set to 0 to disable bluetooth support
|
||||
%if 0%{?opensuse_bs} && 0%{?sles_version} == 9
|
||||
%define bluetooth 0
|
||||
%else
|
||||
%define bluetooth 1
|
||||
%endif
|
||||
# Set to 0 to disable PostgreSQL support
|
||||
%define pqsql 1
|
||||
# Set to 0 to disable MySQL support
|
||||
%define mysql 1
|
||||
# Set to 0 to disable DBI support
|
||||
%define dbi 0
|
||||
# Set to 0 to disable USB support
|
||||
%define usb 1
|
||||
# Change if using tar.gz sources
|
||||
%define extension bz2
|
||||
# Python name
|
||||
%{!?__python: %define __python python}
|
||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
|
||||
%define gammu_docdir %_docdir/%{name}-%{version}
|
||||
%else
|
||||
%define gammu_docdir %_docdir/%{name}
|
||||
%endif
|
||||
Summary: Mobile phone management utility
|
||||
License: GPL v2 or later
|
||||
Url: http://www.gammu.org
|
||||
Summary: Mobile Phone Tools
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
%if 0%{?suse_version}
|
||||
Group: Hardware/Mobile
|
||||
%else
|
||||
Group: Hardware/Mobile
|
||||
%endif
|
||||
# Detect build requires, I really hate this crap
|
||||
# SUSE
|
||||
%if 0%{?suse_version}
|
||||
%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite
|
||||
# 11.1 changed name of devel package for Bluetooth
|
||||
%if 0%{?suse_version} >= 1110
|
||||
%define dist_bluez_libs bluez-devel
|
||||
%else
|
||||
%define dist_bluez_libs bluez-libs >= 2.0
|
||||
%endif
|
||||
# 10.3 changed name of several packages
|
||||
%if 0%{?suse_version} >= 1030
|
||||
%define dist_mysql_libs libmysqlclient-devel
|
||||
%else
|
||||
%define dist_mysql_libs mysql-devel
|
||||
%endif
|
||||
%define dist_postgres_libs postgresql-devel
|
||||
%else
|
||||
# Mandriva
|
||||
%if 0%{?mandriva_version}
|
||||
%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite3-tools
|
||||
# 64-bit Mandriva has 64 in package name
|
||||
%ifarch x86_64
|
||||
%define mandriva_hack 64
|
||||
%endif
|
||||
# MySQL devel packages got rename in 2007
|
||||
%if 0%{?mandriva_version} > 2007
|
||||
%define dist_mysql_libs lib%{?mandriva_hack}mysql-devel
|
||||
%else
|
||||
%define dist_mysql_libs lib%{?mandriva_hack}mysql15-devel
|
||||
%endif
|
||||
# Bluetooth things got renamed several times
|
||||
%if 0%{?mandriva_version} > 2007
|
||||
%define dist_bluez_libs lib%{?mandriva_hack}bluez2 lib%{?mandriva_hack}bluez-devel
|
||||
%else
|
||||
%if 0%{?mandriva_version} > 2006
|
||||
%define dist_bluez_libs lib%{?mandriva_hack}bluez2 lib%{?mandriva_hack}bluez2-devel
|
||||
%else
|
||||
%define dist_bluez_libs libbluez1 >= 2.0 libbluez1-devel >= 2.0
|
||||
%endif
|
||||
%endif
|
||||
# postgresql-devel does not work for whatever reason in buildservice
|
||||
%if 0%{?mandriva_version} == 2009
|
||||
%define dist_postgres_libs postgresql8.3-devel
|
||||
%else
|
||||
%define dist_postgres_libs postgresql-devel
|
||||
%endif
|
||||
%else
|
||||
# Fedora / Redhat / Centos
|
||||
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
|
||||
%define dist_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite
|
||||
# MySQL devela package has different name since Fedora 8 and in all RHEL/Centos
|
||||
%if 0%{?fedora_version} >= 8 || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} >= 8 || 0%{?rhel}
|
||||
%define dist_mysql_libs mysql-devel
|
||||
%else
|
||||
%define dist_mysql_libs mysqlclient14-devel
|
||||
%endif
|
||||
%define dist_bluez_libs bluez-libs >= 2.0 bluez-libs-devel >= 2.0
|
||||
%define dist_postgres_libs postgresql-devel
|
||||
%else
|
||||
#Defaults for not know distributions
|
||||
%define dist_mysql_libs libmysqlclient-devel
|
||||
%define dist_bluez_libs bluez-libs >= 2.0 bluez-libs-devel >= 2.0
|
||||
%define dist_postgres_libs postgresql-devel
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%if %bluetooth
|
||||
BuildRequires: %{dist_bluez_libs}
|
||||
%endif
|
||||
%if pqsql
|
||||
BuildRequires: %{dist_postgres_libs}
|
||||
%endif
|
||||
%if %mysql
|
||||
BuildRequires: %{dist_mysql_libs}
|
||||
%endif
|
||||
%if %dbi
|
||||
BuildRequires: %{dist_dbi_libs}
|
||||
%endif
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: libcurl-devel
|
||||
%if %usb
|
||||
BuildRequires: libusb-1_0-devel
|
||||
%endif
|
||||
BuildRequires: cmake gettext pkgconfig
|
||||
Source: http://dl.cihar.com/gammu/releases/gammu-%{version}.tar.%{extension}
|
||||
Url: http://cihar.com/gammu/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: bluez-devel cmake
|
||||
|
||||
%description
|
||||
Gammu can do things with cellular phones such as making data calls,
|
||||
updating the address book, changing calendar and ToDo entries, sending
|
||||
and receiving SMS messages, loading and getting ring tones and pictures
|
||||
(different types of logos), synchronizing time, enabling NetMonitor,
|
||||
managing WAP settings and bookmarks, and much more. Functions depend on
|
||||
the phone model.
|
||||
Gammu is command line utility and library to work with mobile phones
|
||||
from many vendors. Support for different models differs, but basic
|
||||
functions should work with majority of them. Program can work with
|
||||
contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem,
|
||||
integrated radio, camera, etc. It also supports daemon mode to send and
|
||||
receive SMSes.
|
||||
|
||||
Currently supported phones are:
|
||||
Currently supported phones include:
|
||||
|
||||
* Many Nokia phones
|
||||
* Many Nokia models.
|
||||
|
||||
* Alcatel BE5 (501/701), BF5 (715)
|
||||
* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735).
|
||||
|
||||
* Any AT capable phone (Siemens, Nokia, Alcatel, IPAQ, etc)
|
||||
* AT capable phones (Siemens, Nokia, Alcatel, IPAQ).
|
||||
|
||||
Another similar tool you might want to check is gnokii.
|
||||
* OBEX and IrMC capable phones (Sony-Ericsson, Motorola).
|
||||
|
||||
* Symbian phones through gnapplet.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Marcin Wiacek <marcin@mwiacek.com>
|
||||
Michal Cihar <michal@cihar.com>
|
||||
|
||||
%package devel
|
||||
License: GPL v2 or later
|
||||
Summary: Development files for Gammu
|
||||
%if 0%{?suse_version}
|
||||
Group: Development/Libraries/C and C++
|
||||
%else
|
||||
Group: Development/Libraries/C and C++
|
||||
%endif
|
||||
AutoReqProv: on
|
||||
Requires: gammu = %{version}, pkgconfig
|
||||
Requires: %{name} = %{version}-%{release} pkgconfig
|
||||
|
||||
%description devel
|
||||
Gammu can do such things with cellular phones as making data calls,
|
||||
@@ -84,21 +201,57 @@ Another simmilar tool you might want to check is gnokii.
|
||||
Authors:
|
||||
--------
|
||||
Marcin Wiacek <marcin@mwiacek.com>
|
||||
Michal Cihar <michal@cihar.com>
|
||||
|
||||
%package -n python-gammu
|
||||
License: GPL v2 or later
|
||||
Summary: Python module to communicate with mobile phones
|
||||
%if 0%{?suse_version}
|
||||
Group: Development/Libraries/Python
|
||||
%else
|
||||
Group: Development/Libraries/Python
|
||||
%endif
|
||||
Requires: python
|
||||
%{?py_requires}
|
||||
|
||||
%description -n python-gammu
|
||||
This provides gammu module, that can work with any phone Gammu supports
|
||||
- many Nokias, Siemens, Alcatel, ...
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Michal Cihar <michal@cihar.com>
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
CFLAGS=$RPM_OPT_FLAGS LDLIBS=-lm \
|
||||
cmake -DENABLE_SHARED=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DINSTALL_DOC_DIR=%{_defaultdocdir}/%{name}
|
||||
make VERBOSE=1
|
||||
mkdir build-dir
|
||||
cd build-dir
|
||||
cmake ../ \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_PYTHON=/usr/bin/python \
|
||||
-DCMAKE_INSTALL_PREFIX=%_prefix \
|
||||
-DINSTALL_DOC_DIR=%gammu_docdir \
|
||||
-DINSTALL_LIB_DIR=%_lib \
|
||||
-DINSTALL_LIBDATA_DIR=%_lib
|
||||
make %{?_smp_mflags} %{!?_smp_mflags:%{?jobs:-j %jobs}}
|
||||
|
||||
%check
|
||||
cd build-dir
|
||||
ctest -V
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
if [ "lib" != "%{_lib}" ]; then
|
||||
mv $RPM_BUILD_ROOT%{_prefix}/lib $RPM_BUILD_ROOT%{_prefix}/%{_lib}
|
||||
fi
|
||||
%if 0%{?suse_version} == 0
|
||||
rm -rf %buildroot
|
||||
mkdir %buildroot
|
||||
%endif
|
||||
make -C build-dir install DESTDIR=%buildroot
|
||||
%find_lang %{name}
|
||||
%find_lang libgammu
|
||||
cat libgammu.lang >> %{name}.lang
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
@@ -106,22 +259,40 @@ fi
|
||||
|
||||
%files -f %name.lang
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING README SUPPORTERS docs/user/gammu.htm docs/user/readme.htm
|
||||
%doc %{_mandir}/man1/*
|
||||
%{_bindir}/*
|
||||
%{_libdir}/libGammu*.so.*
|
||||
%_bindir/*
|
||||
%_libdir/*.so.*
|
||||
%_mandir/man1/*
|
||||
%_mandir/man5/*
|
||||
%_mandir/man7/*
|
||||
%lang(cs) %_mandir/cs
|
||||
%doc %gammu_docdir
|
||||
/etc/bash_completion.d/gammu
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc docs/develop docs/examples
|
||||
%{_includedir}/gammu
|
||||
%{_libdir}/libGammu*so
|
||||
%{_libdir}/pkgconfig/gammu.pc
|
||||
%_includedir/%name
|
||||
%_libdir/pkgconfig/%name.pc
|
||||
%_libdir/pkgconfig/%name-smsd.pc
|
||||
%_libdir/*.so
|
||||
|
||||
%files -n python-gammu
|
||||
%defattr(-,root,root)
|
||||
%doc README.Python python/examples
|
||||
%python_sitearch/*
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %buildroot
|
||||
|
||||
%changelog
|
||||
* Wed Mar 18 2009 prusnak@suse.cz
|
||||
- updated to 1.23.1
|
||||
* Documentation clarification.
|
||||
* Translations update.
|
||||
* Actually install gammu-smsd-monitor.
|
||||
* Fix recording received messages count for MySQL.
|
||||
* Fix SMS location handling for Huawei E160 (bug #825).
|
||||
* Do not probe for MPBR support all the time.
|
||||
- new spec taken from home:Nijel (upstream) project
|
||||
* Mon Sep 15 2008 dmueller@suse.de
|
||||
- adjust buildrequires
|
||||
* Tue Sep 09 2008 prusnak@suse.cz
|
||||
|
Reference in New Issue
Block a user