%define with_server 1 Name: obexd Summary: D-Bus service for Obex Client access License: GPL-2.0+ Group: System/Daemons Version: 0.48 Release: 0 Url: http://www.bluez.org/ Source0: obexd-%{version}.tar.xz Source1: obexd-server.desktop Source2: obexd-setup.sh BuildRequires: libtool BuildRequires: update-desktop-files BuildRequires: pkgconfig(bluez) >= 4.99 BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libical) %description obexd is an implementation of the Obex Push protocol, common on mobile phones and other Bluetooth-equipped devices. %package client 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 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 %endif %prep %setup -q %build autoreconf -f -i %configure --libexecdir=%{_libdir}/obex --with-phonebook=dummy \ %if ! 0%{?with_server} --disable-server \ %endif --disable-static unset LD_AS_NEEDED make %{?_smp_mflags} sed -i -e "s,@libexecdir@,%{_libdir}/obex,g" %{SOURCE1} %install %make_install mkdir 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/obexd-setup.sh %endif %files %defattr(-,root,root,-) %license COPYING %files client %defattr(-,root,root,-) %dir %{_libdir}/obex %{_libdir}/obex/obex-client %{_datadir}/dbus-1/services/obex-client.service %if 0%{?with_server} %files server %defattr(-,root,root,-) %dir %{_libdir}/obex %{_libdir}/obex/obexd %{_libdir}/obex/obexd-setup.sh %{_datadir}/dbus-1/services/obexd.service %{_sysconfdir}/xdg/autostart/obexd-server.desktop %endif