faf3381eee190450519e7c710de080882ca17dc7
[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.47
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 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
14
15 BuildRequires:  libtool
16 BuildRequires:  update-desktop-files
17 BuildRequires:  pkgconfig(bluez) >= 4.99
18 BuildRequires:  pkgconfig(dbus-1)
19 BuildRequires:  pkgconfig(glib-2.0)
20 BuildRequires:  pkgconfig(libical)
21
22 %description
23 obexd is an implementation of the Obex Push protocol, common on mobile phones and
24 other Bluetooth-equipped devices.
25
26 %package client
27 Summary:        D-Bus service for Obex Server access
28 Group:          System/Daemons
29 Requires:       obexd
30
31 %description client
32 Client to allow sending files using the Obex Push protocol
33
34 %if 0%{?with_server}
35
36 %package server
37 Summary:        D-Bus service for Obex Server service
38 Group:          System/Daemons
39 Conflicts:      obex-data-server
40 Requires:       obexd
41
42 %description server
43 Server to allow receiving and sharing files using the Obex Push protocol
44 %endif
45
46 %prep
47 %setup -q
48
49 %build
50 autoreconf -f -i
51 %configure --libexecdir=%{_libdir}/obex --with-phonebook=dummy \
52 %if ! 0%{?with_server}
53         --disable-server \
54 %endif
55         --disable-static
56 unset LD_AS_NEEDED
57 make %{?_smp_mflags}
58 sed -i -e "s,@libexecdir@,%{_libdir}/obex,g" %{SOURCE1}
59
60 %install
61 %make_install
62
63 mkdir examples/
64
65 %if 0%{?with_server}
66 mkdir -p %{buildroot}/%{_sysconfdir}/xdg/autostart/
67 install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/xdg/autostart/
68 install -m 0755 %{SOURCE2} %{buildroot}/%{_libdir}/obex/obexd-setup.sh
69 %endif
70
71 %files
72 %defattr(-,root,root,-)
73 %doc COPYING 
74
75 %files client
76 %defattr(-,root,root,-)
77 %dir %{_libdir}/obex
78 %{_libdir}/obex/obex-client
79 %{_datadir}/dbus-1/services/obex-client.service
80
81 %if 0%{?with_server}
82
83 %files server
84 %defattr(-,root,root,-)
85 %dir %{_libdir}/obex
86 %{_libdir}/obex/obexd
87 %{_libdir}/obex/obexd-setup.sh
88 %{_datadir}/dbus-1/services/obexd.service
89 %{_sysconfdir}/xdg/autostart/obexd-server.desktop
90 %endif