Add multi-user support
[platform/core/connectivity/bluetooth-share.git] / packaging / bluetooth-share.spec
1 Name:       bluetooth-share
2 Summary:    Bluetooth file share Agent
3 Version:    0.0.47
4 Release:    0
5 Group:      Network & Connectivity/Bluetooth
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
9 Source1002: libbluetooth-share.manifest
10 Source1003: libbluetooth-share-devel.manifest
11 Source1004: init_db.sh
12 Requires(post): vconf
13 Requires(post): coreutils
14 Requires(post): sqlite
15 Requires(post): smack
16 BuildRequires:  cmake
17 BuildRequires:  gettext-tools
18 BuildRequires:  pkgconfig(appcore-efl)
19 BuildRequires:  pkgconfig(bluetooth-api)
20 BuildRequires:  pkgconfig(glib-2.0)
21 BuildRequires:  pkgconfig(aul)
22 BuildRequires:  pkgconfig(dlog)
23 BuildRequires:  pkgconfig(calendar-service2)
24 BuildRequires:  pkgconfig(contacts-service2)
25 BuildRequires:  pkgconfig(vconf)
26 BuildRequires:  pkgconfig(syspopup-caller)
27 BuildRequires:  pkgconfig(pmapi)
28 BuildRequires:  pkgconfig(sysman)
29 BuildRequires:  pkgconfig(notification)
30 BuildRequires:  pkgconfig(appsvc)
31 BuildRequires:  pkgconfig(db-util)
32 BuildRequires:  pkgconfig(libprivilege-control)
33 BuildRequires:  pkgconfig(capi-content-media-content)
34 BuildRequires:  pkgconfig(libtzplatform-config)
35
36 %description
37 Bluetooth File Share Agent
38
39 %package -n libbluetooth-share
40 Summary:    Bluetooth share library
41 Group:      Development/Libraries
42 Requires:   %{name} = %{version}-%{release}
43
44 %description -n libbluetooth-share
45 Bluetooth share library
46
47 %package -n libbluetooth-share-devel
48 Summary:    Development package for libbluetooth-share
49 Group:      Development/Libraries
50 Requires:   %{name} = %{version}-%{release}
51
52 %description -n libbluetooth-share-devel
53 Development package for libbluetooth-share
54
55 %prep
56 %setup -q
57 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
58
59 %build
60 export CFLAGS+=" -fpie -fvisibility=hidden"
61 export LDFLAGS+=" -Wl,--rpath=/usr/%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
62
63 %cmake .
64 make
65
66 %install
67 %make_install
68 mkdir -p  %{buildroot}%{TZ_SYS_SHARE}/bt-ftp
69 install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_SYS_SHARE}/%{name}/ressources/init_db.sh
70
71 %post -n libbluetooth-share-devel -p /sbin/ldconfig
72
73 %post -n libbluetooth-share -p /sbin/ldconfig
74
75 %postun -n libbluetooth-share-devel -p /sbin/ldconfig
76
77 %postun -n libbluetooth-share -p /sbin/ldconfig
78
79 %files
80 %manifest %{name}.manifest
81 %{TZ_SYS_ETC}/smack/accesses.d/bluetooth-share.rule
82 %defattr(-,root,root,-)
83 %{_bindir}/bluetooth-share
84 %{_datadir}/dbus-1/system-services/org.bluetooth.share.service
85 %{TZ_SYS_SHARE}/bt-ftp
86 %{TZ_SYS_SHARE}/%{name}
87
88 %files -n libbluetooth-share
89 %manifest libbluetooth-share.manifest
90 %defattr(-, root, root)
91 %{_libdir}/libbluetooth-share-api.so.0.*
92
93 %files -n libbluetooth-share-devel
94 %manifest libbluetooth-share-devel.manifest
95 %defattr(-, root, root)
96 %{_includedir}/bluetooth-share-api/bluetooth-share-api.h
97 %{_libdir}/libbluetooth-share-api.so
98 %{_libdir}/pkgconfig/bluetooth-share-api.pc