Add missing include to fix build with glibc 2.17
[platform/upstream/obexd.git] / packaging / obexd.spec
1 %define with_server 1
2
3 Name:           obexd
4 Summary:        D-Bus service for Obex Client access
5 License:        GPL-2.0+
6 Group:          System/Daemons
7 Version:        0.48
8 Release:        0
9 Url:            http://www.bluez.org/
10 Source0:        obexd-%{version}.tar.xz
11 Source1:        obexd-server.desktop
12 Source2:        obexd-setup.sh
13
14 BuildRequires:  libtool
15 BuildRequires:  update-desktop-files
16 BuildRequires:  pkgconfig(bluez) >= 4.99
17 BuildRequires:  pkgconfig(dbus-1)
18 BuildRequires:  pkgconfig(glib-2.0)
19 BuildRequires:  pkgconfig(libical)
20
21 %description
22 obexd is an implementation of the Obex Push protocol, common on mobile phones and
23 other Bluetooth-equipped devices.
24
25 %package client
26 Summary:        D-Bus service for Obex Server access
27 Group:          System/Daemons
28 Requires:       obexd
29
30 %description client
31 Client to allow sending files using the Obex Push protocol
32
33 %if 0%{?with_server}
34
35 %package server
36 Summary:        D-Bus service for Obex Server service
37 Group:          System/Daemons
38 Conflicts:      obex-data-server
39 Requires:       obexd
40
41 %description server
42 Server to allow receiving and sharing files using the Obex Push protocol
43 %endif
44
45 %prep
46 %setup -q
47
48 %build
49 autoreconf -f -i
50 %configure --libexecdir=%{_libdir}/obex --with-phonebook=dummy \
51 %if ! 0%{?with_server}
52         --disable-server \
53 %endif
54         --disable-static
55 unset LD_AS_NEEDED
56 make %{?_smp_mflags}
57 sed -i -e "s,@libexecdir@,%{_libdir}/obex,g" %{SOURCE1}
58
59 %install
60 %make_install
61
62 mkdir examples/
63
64 %if 0%{?with_server}
65 mkdir -p %{buildroot}/%{_sysconfdir}/xdg/autostart/
66 install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/xdg/autostart/
67 install -m 0755 %{SOURCE2} %{buildroot}/%{_libdir}/obex/obexd-setup.sh
68 %endif
69
70 %files
71 %defattr(-,root,root,-)
72 %license COPYING 
73
74 %files client
75 %defattr(-,root,root,-)
76 %dir %{_libdir}/obex
77 %{_libdir}/obex/obex-client
78 %{_datadir}/dbus-1/services/obex-client.service
79
80 %if 0%{?with_server}
81
82 %files server
83 %defattr(-,root,root,-)
84 %dir %{_libdir}/obex
85 %{_libdir}/obex/obexd
86 %{_libdir}/obex/obexd-setup.sh
87 %{_datadir}/dbus-1/services/obexd.service
88 %{_sysconfdir}/xdg/autostart/obexd-server.desktop
89 %endif