File bluedevil.spec of Package bluedevil

#
# spec file for package bluedevil
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Raymond Wooninck <tittiatcoke@gmail.com>
#
# 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/
#


%define with_lang 1

Name:           bluedevil
Version:        2.1.1
Release:        0
Summary:        Bluetooth Manager for KDE
License:        GPL-2.0+
Group:          Hardware/Other
Url:            http://www.kde.org/
Source:         http://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
Source1:        preferences-system-bluetooth.png
Patch0:         typo2.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  libbluedevil-devel >= 2.1
BuildRequires:  libkde4-devel
BuildRequires:  shared-mime-info
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
# atop of the bluez itself, we also need bluez-obexd for kio_obexftp and both send/receive
Requires:       bluez
# for connecting A2DP profile
Recommends:     pulseaudio-module-bluetooth
%if %with_lang
Recommends:     %{name}-lang = %{version}
%endif
Provides:       kbluetooth = %{version}
Obsoletes:      kbluetooth < %{version}
%kde4_runtime_requires
Requires(post): shared-mime-info
Requires(postun): shared-mime-info

%description
Bluetooth daemon for KDE, handling connections.

%lang_package
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1

%build
%cmake_kde4 -d build
%make_jobs

%install
%kde4_makeinstall -C build

install -D -pm 0644 %{SOURCE1} %{buildroot}%{_kde4_iconsdir}/hicolor/64x64/apps/preferences-system-bluetooth.png

%if 0%{?suse_version}
%suse_update_desktop_file -r bluedevil-monolithic Qt KDE Utility DesktopUtility
%endif

%if %with_lang
%find_lang %{name}
%endif

%kde_post_install

%post
/usr/bin/update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :

%postun
/usr/bin/update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :

%files
%defattr(-,root,root,-)
%doc README
%{_datadir}/mime/packages/bluedevil-mime.xml
%{_kde4_applicationsdir}/bluedevil-*.desktop
%{_kde4_appsdir}/bluedevil/
%{_kde4_appsdir}/bluedevilwizard/
%{_kde4_bindir}/bluedevil-*
%{_kde4_iconsdir}/hicolor/64x64/apps/preferences-system-bluetooth.png
%{_kde4_libexecdir}/bluedevil-*
%{_kde4_modulesdir}/bluetoothfileitemaction.so
%{_kde4_modulesdir}/kcm_bluedevil*.so
%{_kde4_modulesdir}/kded_bluedevil.so
%{_kde4_modulesdir}/kded_obexftpdaemon.so
%{_kde4_modulesdir}/kio_bluetooth.so
%{_kde4_modulesdir}/kio_obexftp.so
%{_kde4_servicesdir}/bluedevil*.desktop
%{_kde4_servicesdir}/bluetooth.protocol
%{_kde4_servicesdir}/kded/bluedevil.desktop
%{_kde4_servicesdir}/kded/obexftpdaemon.desktop
%{_kde4_servicesdir}/obexftp.protocol

%if %with_lang
%files lang -f %{name}.lang
%defattr(-,root,root,-)
%endif

%changelog
openSUSE Build Service is sponsored by