File obexd.spec of Package obexd.import4673

# spec file for package obexd
# Copyright (c) 2011 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
# 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

# norootforbuild

%define with_server 1

Name:           obexd
Summary:        D-Bus service for Obex Client access
Group:          System/Daemons
Version:        0.39
Release:        4.<RELEASE5>
License:        GPLv2+
Source0:        obexd-%{version}.tar.bz2
Source1:        obexd-server.desktop
# PATCH-FIX-MOBLIN obexd-users-home-for-root.patch bnc567383 - Use ~/Public for users shared folder
Patch0:         obexd-users-home-for-root.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  glib2-devel
BuildRequires:  dbus-1-devel
BuildRequires:  bluez-devel >= 4.0
BuildRequires:  update-desktop-files

BuildRequires:  openobex-devel
BuildRequires:  evolution-data-server-devel

Requires:       evolution-data-server

obexd is an implementation of the Obex Push protocol, common on mobile phones and
other Bluetooth-equipped devices.

%package client
License:        GPLv2+
Summary:        D-Bus service for Obex Server access
Group:          System/Daemons
Requires:       obexd

%description client
Client to allow sending files using the Obex Push protocol

%if 0%{?with_server}

%package server
License:        GPLv2+
Summary:        D-Bus service for Obex Server service
Group:          System/Daemons
Conflicts:      obex-data-server
Requires:       obexd

%description server
Server to allow receiving and sharing files using the Obex Push protocol

%setup -q
%patch0 -p1

autoreconf -f -i
%configure --libexecdir=%{_libdir}/obex --with-phonebook=ebook \
%if ! 0%{?with_server}
	--disable-server \
make %{?_smp_mflags}
sed -i -e "s,@libexecdir@,%{_libdir}/obex,g" %{SOURCE1}


mkdir examples/
cp test/send-files examples/

%if 0%{?with_server}
mkdir -p %{buildroot}/%{_sysconfdir}/xdg/autostart/
install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/xdg/autostart/
install -m 0755 %{SOURCE2} %{buildroot}/%{_libdir}/obex/
%suse_update_desktop_file obexd-server System RemoteAccess

%doc README COPYING AUTHORS doc/client-api.txt examples

%files client
%dir %{_libdir}/obex

%if 0%{?with_server}

%files server
%dir %{_libdir}/obex

openSUSE Build Service is sponsored by