Accepting request 76855 from home:adra:branches:hardware

Updated to 1.30.0, Spec file updates, Modified gammu-smsd.lsb.patch

OBS-URL: https://build.opensuse.org/request/show/76855
OBS-URL: https://build.opensuse.org/package/show/hardware/gammu?expand=0&rev=12
This commit is contained in:
Ismail Dönmez
2011-07-24 13:19:07 +00:00
committed by Git OBS Bridge
parent 101ff6f782
commit 76d3de3e3f
6 changed files with 107 additions and 66 deletions

View File

@@ -18,20 +18,16 @@
Name: gammu
Version: 1.29.0
Version: 1.30.0
Release: 1
Summary: Mobile phone management utility
License: GPLv2
Url: http://wammu.eu/gammu/
%if 0%{?suse_version}
Group: Applications/Communications
%else
Group: Applications/Communications
%endif
Source0: http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE gammu-smsd.lsb.patch asterios.dramis@gmail.com -- Fix rpmlint warning "unknown-lsb-keyword" for init script
Patch0: gammu-smsd.lsb_unknown-lsb-keyword.patch
Group: Productivity/Telephony/Utilities
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE gammu-smsd.lsb.patch asterios.dramis@gmail.com -- Fix rpmlint warnings "unknown-lsb-keyword" and "init-script-runlevel-4"
Patch0: gammu-smsd.lsb.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Python location
@@ -50,13 +46,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
# SUSE
%if 0%{?suse_version}
%define dist_usb_libs libusb-1_0-devel
%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_dbi_libs libdbi-devel libdbi-drivers-dbd-sqlite3 sqlite3
%define dist_bluez_libs bluez-devel
%else
%define dist_bluez_libs bluez-libs >= 2.0
%endif
%define dist_postgres_libs postgresql-devel
%else
# Mandriva
@@ -91,7 +82,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define dist_bluez_libs bluez-libs-devel >= 2.0
%define dist_postgres_libs postgresql-devel
%else
#Defaults for not know distributions
#Defaults for not known distributions
%define dist_usb_libs libusb1-devel
%define dist_dbi_libs libdbi-devel libdbi-dbd-sqlite sqlite
%define dist_bluez_libs bluez-libs-devel >= 2.0
@@ -118,6 +109,7 @@ BuildRequires: pkg-config
BuildRequires: pkgconfig
%endif
BuildRequires: python-devel
BuildRequires: unixODBC-devel
BuildRequires: %{dist_bluez_libs}
%if 0%{?suse_version} > 1130
BuildRequires: %{dist_dbi_libs}
@@ -148,11 +140,7 @@ This package contains Gammu binary as well as some examples.
%package devel
Summary: Development files for Gammu
License: GPLv2
%if 0%{?suse_version}
Group: Development/Libraries
%else
Group: Development/Libraries
%endif
Group: Development/Libraries/C and C++
%if 0%{?suse_version}
Requires: pkg-config
%else
@@ -181,11 +169,7 @@ This package contain files needed for development.
%package smsd
Summary: SMS message daemon
License: GPLv2
%if 0%{?suse_version}
Group: Applications/Communications
%else
Group: Applications/Communications
%endif
Group: Hardware/Mobile
%if 0%{?suse_version}
Requires(post): %insserv_prereq %fillup_prereq
Requires(preun): %insserv_prereq %fillup_prereq
@@ -219,11 +203,7 @@ into the queue.
%package -n libGammu7
Summary: Mobile phone management library
License: GPLv2
%if 0%{?suse_version}
Group: System/Libraries
%else
Group: System/Libraries
%endif
%description -n libGammu7
Gammu is command line utility and library to work with mobile phones
@@ -246,11 +226,7 @@ This package contains Gammu shared library.
%package -n libgsmsd7
Summary: SMS daemon helper library
License: GPLv2
%if 0%{?suse_version}
Group: System/Libraries
%else
Group: System/Libraries
%endif
%description -n libgsmsd7
Gammu is command line utility and library to work with mobile phones
@@ -273,11 +249,7 @@ This package contains Gammu SMS daemon shared library.
%package -n python-gammu
Summary: Python module to communicate with mobile phones
License: GPLv2
%if 0%{?suse_version}
Group: Development/Languages
%else
Group: Development/Languages
%endif
Group: Development/Languages/Python
Requires: python >= %{g_python_major_version}
Requires: python < %{g_python_major_version}.99
%if 0%{?suse_version} < 1130
@@ -292,14 +264,18 @@ supports - many Nokias, Siemens, Alcatel, ...
%setup -q
%patch0
# Remove build time references - Fix rpmlint warning "file-contains-date-and-time"
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%H:%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%b %e %Y')
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" gammu/gammu.c gammu-detect/main.c libgammu/gsmstate.c smsd/inject.c smsd/monitor.c smsd/main.c
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" gammu/gammu.c gammu-detect/main.c libgammu/gsmstate.c libgammu/phone/dummy/dummy.c smsd/inject.c smsd/monitor.c smsd/main.c
# Change permissions - Fix rpmlint warning "doc-file-dependency"
chmod 644 python/examples/*.py
%build
mkdir build-dir
cd build-dir
mkdir build
cd build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
cmake ../ \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_PYTHON=/usr/bin/python \
@@ -308,24 +284,24 @@ cmake ../ \
-DINSTALL_LIB_DIR=%{_lib} \
-DINSTALL_LIBDATA_DIR=%{_lib} \
-DINSTALL_LSB_INIT=ON
make %{?_smp_mflags}
make %{?_smp_mflags} VERBOSE=1
cd ..
%check
#cd build-dir
#cd build
#ctest -V
#cd ..
%install
%if !0%{?suse_version}
make -C build-dir install DESTDIR=%{buildroot}
make -C build install DESTDIR=%{buildroot}
%else
cd build-dir
cd build
%makeinstall
cd ..
%endif
# Change permissions
# Change permissions - Fix rpmlint warning "non-executable-script"
chmod 755 %{buildroot}%{_sysconfdir}/init.d/gammu-smsd
# rc-symlink for gammu-smsd
@@ -336,10 +312,10 @@ ln -sf ../../etc/init.d/gammu-smsd %{buildroot}%{_sbindir}/rcgammu-smsd
install -p -m 0644 docs/config/smsdrc %{buildroot}%{_sysconfdir}/gammu-smsdrc
# Install additional doc files
install -p -m 0644 AUTHORS BUGS README.cs README.en_GB %{buildroot}%{gammu_docdir}/
install -p -m 0644 AUTHORS README.cs README.de README.en_GB README.es README.id README.pt_BR %{buildroot}%{gammu_docdir}/
# Remove unneeded locales
%if 0%{?suse_version} < 1140
%if 0%{?suse_version} && 0%{?suse_version} < 1140
rm -rf %{buildroot}%{_datadir}/locale/sw/
%endif
@@ -375,7 +351,6 @@ fi
%endif
%if 0%{?suse_version}
%postun smsd
%restart_on_update gammu-smsd
%insserv_cleanup
@@ -394,8 +369,10 @@ fi
%config %{_sysconfdir}/bash_completion.d/gammu
%{_bindir}/gammu
%{_bindir}/gammu-config
%{_bindir}/gammu-detect
%{_bindir}/jadmaker
%doc %{gammu_docdir}
%{_datadir}/gammu/
%doc %{_mandir}/man1/gammu-config.1%{ext_man}
%doc %{_mandir}/man1/gammu-detect.1%{ext_man}
%doc %{_mandir}/man1/gammu.1%{ext_man}
@@ -427,6 +404,7 @@ fi
%doc %{_mandir}/man7/gammu-smsd-files.7%{ext_man}
%doc %{_mandir}/man7/gammu-smsd-mysql.7%{ext_man}
%doc %{_mandir}/man7/gammu-smsd-null.7%{ext_man}
%doc %{_mandir}/man7/gammu-smsd-odbc.7%{ext_man}
%doc %{_mandir}/man7/gammu-smsd-pgsql.7%{ext_man}
%doc %{_mandir}/man7/gammu-smsd-run.7%{ext_man}
%doc %{_mandir}/man7/gammu-smsd-sql.7%{ext_man}
@@ -434,11 +412,11 @@ fi
%files -n libGammu7 -f libgammu.lang
%defattr(-,root,root,-)
%{_libdir}/libGammu.so.*
%{_libdir}/libGammu.so.7*
%files -n libgsmsd7
%defattr(-,root,root,-)
%{_libdir}/libgsmsd.so.*
%{_libdir}/libgsmsd.so.7*
%files -n python-gammu
%defattr(-,root,root,-)