File gnome-phone-manager.spec of Package gnome-phone-manager

#
# spec file for package gnome-phone-manager
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           gnome-phone-manager
Version:        0.69
Release:        0
Summary:        Phone Manager for GNOME
License:        GPL-2.0+
Group:          Hardware/Mobile
Url:            http://usefulinc.com/software/phonemgr
Source:         http://download.gnome.org/sources/gnome-phone-manager/0.69/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE gnome-phone-manager-desktop-icon-check.patch bnc#337219
Patch0:         gnome-phone-manager-desktop-icon-check.patch
# PATCH-FIX-UPSTREAM gnome-phone-manager-eds36.patch bgo#680927 dimstar@opensuse.org -- Fix build with e-d-s 3.6.
Patch1:         gnome-phone-manager-eds36.patch
# PATCH-FIX-UPSTREAM gnome-phone-manager-telepathy.patch bgo#697420 dimstar@opensuse.org -- Define prototypes in headers
Patch2:         gnome-phone-manager-telepathy.patch
# PATCH-FIX-UPSTREAM gnome-phone-manager-drop-plugin.patch zaitor@opensuse.org -- Patch out plugin support, no longer in gnome-bluetooth.
Patch3:         gnome-phone-manager-drop-plugin.patch
# PATCH-FIX-UPSTREAM gnome-phone-manager-missing-srcdir.patch dimstar@opensuse.org -- Do not reference non-existing $(builddir)/src
Patch4:         gnome-phone-manager-missing-srcdir.patch
BuildRequires:  fdupes
# Needed by patch1
BuildRequires:  adwaita-icon-theme
BuildRequires:  gnome-common
BuildRequires:  intltool
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(bluez)
BuildRequires:  pkgconfig(gconf-2.0)
BuildRequires:  pkgconfig(glib-2.0) >= 2.31.0
BuildRequires:  pkgconfig(gnokii)
BuildRequires:  pkgconfig(gnome-bluetooth-1.0) >= 3.3
BuildRequires:  pkgconfig(gnome-icon-theme)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0
BuildRequires:  pkgconfig(libcanberra-gtk3)
BuildRequires:  pkgconfig(libebook-1.2)
BuildRequires:  pkgconfig(telepathy-glib)
Recommends:     %{name}-lang
Obsoletes:      phonemgr
Provides:       phonemgr
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq

%description
This program connects to your mobile phone over a serial port with a
cable, infrared, or Bluetooth connection. It listens for text messages
and, when they arrive, displays them on the desktop. A visual indicator
is displayed in the notification area, if available, in the panel.

%package -n gnome-bluetooth-plugin-phone-manager
Summary:        Phone Manager for GNOME -- Plugin for GNOME Bluetooth
Group:          Hardware/Mobile
Requires:       %{name} = %{version}
Supplements:    packageand(%{name}:gnome-bluetooth)

%description -n gnome-bluetooth-plugin-phone-manager
This plugin for GNOME Bluetooth extends the new device wizard to allow 1-click
configuration of Phone Manager to use a newly paired phone.

%package -n telepathy-phoney
Summary:        Telepathy connection manager for GNOME Phone Manager
Group:          Hardware/Mobile
Requires:       %{name} = %{version}
Enhances:       packageand(%{name}:telepathy-mission-control)
Provides:       %{name}-telepathy = %{version}
Obsoletes:      %{name}-telepathy < %{version}

%description -n telepathy-phoney
Provides connections to your phone for telepathy enabled applications.

%lang_package
%prep
%setup -q 
%patch0
%if 0%{?suse_version} > 1220
%patch1 -p1
%endif
%patch2 -p1
%if 0%{?suse_version} > 1310
%patch3 -p0
%endif
%patch4 -p1

%build
# Needed by patch1
export CFLAGS="%{optflags} -Wno-error=format-y2k"
NOCONFIGURE=1 gnome-autogen.sh
%configure \
        --disable-static \
	--disable-schemas-install
%__make %{?jobs:-j%jobs}

%install
%makeinstall
find %{buildroot}%{_libdir} -name "*.la" -type f -delete -print
%suse_update_desktop_file -N "GNOME Phone Manager" -G "Phone Manager" gnome-phone-manager
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
# Work around for bnc#337219
for dir in 16x16 22x22 24x24 32x32 48x48 256x256; do
    mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$dir/apps/
    cp %{_datadir}/icons/Adwaita/$dir/devices/phone.png %{buildroot}%{_datadir}/icons/hicolor/$dir/apps/gnome-phone-manager.png
done
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%if 0%{?suse_version} > 1130

%post
%desktop_database_post
%icon_theme_cache_post
%endif

%if 0%{?suse_version} > 1130

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files -f %{name}.schemas_list
%defattr (-, root, root)
%doc AUTHORS COPYING NEWS README TODO
%{_mandir}/man1/*
%{_bindir}/gnome-phone-manager
%{_datadir}/applications/gnome-phone-manager.desktop
%{_datadir}/gnome-phone-manager
%{_datadir}/icons/hicolor/*/apps/gnome-phone-manager.*

%files -n gnome-bluetooth-plugin-phone-manager
%defattr (-, root, root)
%dir %{_libdir}/gnome-bluetooth/
%dir %{_libdir}/gnome-bluetooth/plugins/
%{_libdir}/gnome-bluetooth/plugins/libphonemgr.so

%files -n telepathy-phoney
%defattr (-, root, root)
%{_datadir}/dbus-1/services/*.service
%dir %{_datadir}/telepathy
%dir %{_datadir}/telepathy/managers
%{_datadir}/telepathy/managers/phoney.manager
%{_libexecdir}/telepathy-phoney

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by