Accepting request 129868 from home:adra:branches:hardware

Updated to 1.32.0, Don't install the init script, Build the package manual

OBS-URL: https://build.opensuse.org/request/show/129868
OBS-URL: https://build.opensuse.org/package/show/hardware/gammu?expand=0&rev=16
This commit is contained in:
Ismail Dönmez
2012-08-08 19:32:20 +00:00
committed by Git OBS Bridge
parent 0fc5266ccb
commit 1b321cbd4f
4 changed files with 87 additions and 60 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package gammu
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 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,14 +15,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: gammu
Version: 1.31.0
Version: 1.32.0
Release: 0
Summary: Mobile phone management utility
License: GPL-2.0
Group: Productivity/Telephony/Utilities
Url: http://wammu.eu/gammu/
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz
# 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
# Python location
@@ -84,6 +85,17 @@ BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gettext
BuildRequires: glib2-devel
%if 0%{?suse_version} > 1210
BuildRequires: gnu-free-fonts
%else
%if 0%{?suse_version} == 1210
BuildRequires: freefont
%endif
%endif
%if 0%{?suse_version} > 1140
BuildRequires: graphviz
BuildRequires: graphviz-gd
%endif
%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel}
BuildRequires: curl-devel
%else
@@ -109,9 +121,15 @@ BuildRequires: pkg-config
%else
BuildRequires: pkgconfig
%endif
BuildRequires: %{dist_bluez_libs}
%if 0%{?suse_version} > 1140
BuildRequires: python-Sphinx
%endif
BuildRequires: python-devel
BuildRequires: unixODBC-devel
BuildRequires: %{dist_bluez_libs}
%if 0%{?suse_version} && 0%{?suse_version} <= 1210
BuildRequires: xz
%endif
%if 0%{?suse_version} > 1130 || 0%{?mandriva_version} > 2010 || 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
BuildRequires: %{dist_dbi_libs}
%endif
@@ -119,6 +137,7 @@ BuildRequires: %{dist_postgres_libs}
BuildRequires: %{dist_usb_libs}
Requires: bluez
Requires: dialog
Recommends: gammu-doc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -167,19 +186,19 @@ Currently supported phones include:
This package contain files needed for development.
%if 0%{?suse_version} > 1140
%package doc
Summary: Documentation of Gammu
Group: Documentation/HTML
BuildArch: noarch
%description doc
This package contains the manual for gammu.
%endif
%package smsd
Summary: SMS message daemon
Group: Hardware/Mobile
%if 0%{?suse_version}
Requires(post): %insserv_prereq %fillup_prereq
Requires(preun): %insserv_prereq %fillup_prereq
Requires(postun): %insserv_prereq %fillup_prereq
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
%endif
%description smsd
Gammu is command line utility and library to work with mobile phones
@@ -247,8 +266,8 @@ This package contains the Gammu SMS daemon shared library.
%package -n python-gammu
Summary: Python module to communicate with mobile phones
Group: Development/Languages/Python
Requires: python >= %{g_python_major_version}
Requires: python < %{g_python_major_version}.99
Requires: python >= %{g_python_major_version}
%{?py_requires}
%description -n python-gammu
@@ -265,6 +284,7 @@ sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" gammu/gammu.c gammu-detect/main.c libga
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
chmod 644 contrib/init/gammu-smsd.lsb
%build
mkdir build
@@ -278,8 +298,12 @@ cmake ../ \
-DINSTALL_DOC_DIR=%{gammu_docdir} \
-DINSTALL_LIB_DIR=%{_lib} \
-DINSTALL_LIBDATA_DIR=%{_lib} \
-DINSTALL_LSB_INIT=ON
-DINSTALL_LSB_INIT=OFF \
-DINSTALL_UDEV_RULES=OFF
make %{?_smp_mflags} VERBOSE=1
%if 0%{?suse_version} > 1140
make manual-html
%endif
cd ..
%check
@@ -296,19 +320,19 @@ cd build
cd ..
%endif
# Change permissions - Fix rpmlint warning "non-executable-script"
chmod 755 %{buildroot}%{_sysconfdir}/init.d/gammu-smsd
# rc-symlink for gammu-smsd
mkdir -p %{buildroot}%{_sbindir}
ln -sf ../../etc/init.d/gammu-smsd %{buildroot}%{_sbindir}/rcgammu-smsd
# Install config file
install -pm 0644 docs/config/smsdrc %{buildroot}%{_sysconfdir}/gammu-smsdrc
# Install additional doc files
install -pm 0644 AUTHORS README.cs README.da README.de README.en_GB README.es README.id README.pl README.pt_BR %{buildroot}%{gammu_docdir}/
%if 0%{?suse_version} > 1140
# Install the html manual
rm -rf %{buildroot}%{gammu_docdir}/manual/
rm -rf build/docs/manual/html/{.doctrees/,.buildinfo,_sources/}
cp -a build/docs/manual/html/ %{buildroot}%{gammu_docdir}/manual
%endif
# Remove unneeded locales
%if 0%{?suse_version} && 0%{?suse_version} < 1140
rm -rf %{buildroot}%{_datadir}/locale/sw/
@@ -317,38 +341,6 @@ rm -rf %{buildroot}%{_datadir}/locale/sw/
%find_lang %{name}
%find_lang libgammu
%post smsd
%if 0%{?mandriva_version}
%_post_service gammu-smsd
%endif
%if 0%{?suse_version}
%fillup_and_insserv gammu-smsd
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
/sbin/chkconfig --add gammu-smsd
%endif
%preun smsd
%if 0%{?suse_version}
%stop_on_removal gammu-smsd
%endif
%if 0%{?mandriva_version}
%_preun_service gammu-smsd
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
if [ $1 = 0 ] ; then
/sbin/service gammu-smsd stop >/dev/null 2>&1
/sbin/chkconfig --del <script>
fi
%endif
%if 0%{?suse_version}
%postun smsd
%restart_on_update gammu-smsd
%insserv_cleanup
%endif
%post -n libGammu7 -p /sbin/ldconfig
%postun -n libGammu7 -p /sbin/ldconfig
@@ -365,6 +357,9 @@ fi
%{_bindir}/gammu-detect
%{_bindir}/jadmaker
%doc %{gammu_docdir}
%if 0%{?suse_version} > 1140
%exclude %{gammu_docdir}/manual/
%endif
%{_datadir}/gammu/
%doc %{_mandir}/man1/gammu-config.1*
%doc %{_mandir}/man1/gammu-detect.1*
@@ -381,14 +376,19 @@ fi
%{_libdir}/pkgconfig/gammu-smsd.pc
%{_libdir}/pkgconfig/gammu.pc
%if 0%{?suse_version} > 1140
%files doc
%defattr(-,root,root,-)
%doc %{gammu_docdir}/manual/
%endif
%files smsd
%defattr(-,root,root,-)
%doc contrib/init/gammu-smsd.lsb
%config %{_sysconfdir}/gammu-smsdrc
%config %{_sysconfdir}/init.d/gammu-smsd
%{_bindir}/gammu-smsd
%{_bindir}/gammu-smsd-inject
%{_bindir}/gammu-smsd-monitor
%{_sbindir}/rcgammu-smsd
%doc %{_mandir}/man1/gammu-smsd-inject.1*
%doc %{_mandir}/man1/gammu-smsd-monitor.1*
%doc %{_mandir}/man1/gammu-smsd.1*