TIVI-1047: enable obedx-test for QA testing purposes.
[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/Service
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/Service
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/Service
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 %package test
46 Summary:    Test Programs for OBEX
47 Group:      Development/Tools
48 Requires:   %{name} = %{version}-%{release}
49 Requires:   dbus-python
50 Requires:   python-gobject
51 Requires:   python-xml
52
53 %description test
54 Scripts for testing OBEX and its functionality
55
56 %prep
57 %setup -q
58
59 %build
60 autoreconf -f -i
61 %configure --libexecdir=%{_libdir}/obex --with-phonebook=dummy \
62 %if ! 0%{?with_server}
63         --disable-server \
64 %endif
65         --disable-static
66 unset LD_AS_NEEDED
67 make %{?_smp_mflags}
68 sed -i -e "s,@libexecdir@,%{_libdir}/obex,g" %{SOURCE1}
69
70 %install
71 %make_install
72
73 mkdir examples/
74
75 %if 0%{?with_server}
76 mkdir -p %{buildroot}/%{_sysconfdir}/xdg/autostart/
77 install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/xdg/autostart/
78 install -m 0755 %{SOURCE2} %{buildroot}/%{_libdir}/obex/obexd-setup.sh
79 %endif
80
81 chmod 755 test/*
82
83 %files
84 %defattr(-,root,root,-)
85 %license COPYING 
86
87 %files client
88 %defattr(-,root,root,-)
89 %dir %{_libdir}/obex
90 %{_libdir}/obex/obex-client
91 %{_datadir}/dbus-1/services/obex-client.service
92
93 %if 0%{?with_server}
94
95 %files server
96 %defattr(-,root,root,-)
97 %dir %{_libdir}/obex
98 %{_libdir}/obex/obexd
99 %{_libdir}/obex/obexd-setup.sh
100 %{_datadir}/dbus-1/services/obexd.service
101 %{_sysconfdir}/xdg/autostart/obexd-server.desktop
102 %endif
103
104 %files test
105 %defattr(-,root,root,-)
106 %doc test/*
107