Merge "included struct stat definition header" into tizen
[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(dlog)
22 BuildRequires:  pkgconfig(calendar-service2)
23 BuildRequires:  pkgconfig(contacts-service2)
24 BuildRequires:  pkgconfig(vconf)
25 BuildRequires:  pkgconfig(pmapi)
26 BuildRequires:  pkgconfig(sysman)
27 BuildRequires:  pkgconfig(notification)
28 BuildRequires:  pkgconfig(appsvc)
29 BuildRequires:  pkgconfig(db-util)
30 BuildRequires:  pkgconfig(libprivilege-control)
31 BuildRequires:  pkgconfig(capi-content-media-content)
32 BuildRequires:  pkgconfig(libtzplatform-config)
33
34 %description
35 Bluetooth File Share Agent
36
37 %package -n libbluetooth-share
38 Summary:    Bluetooth share library
39 Group:      Development/Libraries
40 Requires:   %{name} = %{version}-%{release}
41
42 %description -n libbluetooth-share
43 Bluetooth share library
44
45 %package -n libbluetooth-share-devel
46 Summary:    Development package for libbluetooth-share
47 Group:      Development/Libraries
48 Requires:   %{name} = %{version}-%{release}
49
50 %description -n libbluetooth-share-devel
51 Development package for libbluetooth-share
52
53 %prep
54 %setup -q
55 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
56
57 %build
58 export CFLAGS+=" -fpie -fvisibility=hidden"
59 export LDFLAGS+=" -Wl,--rpath=/usr/%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
60
61 %cmake . \
62         -DTZ_SYS_ETC=%{TZ_SYS_ETC}
63 make
64
65 %install
66 %make_install
67 mkdir -p  %{buildroot}%{TZ_SYS_SHARE}/bt-ftp
68 install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_SYS_SHARE}/%{name}/ressources/init_db.sh
69
70 %post -n libbluetooth-share-devel -p /sbin/ldconfig
71
72 %post -n libbluetooth-share -p /sbin/ldconfig
73
74 %postun -n libbluetooth-share-devel -p /sbin/ldconfig
75
76 %postun -n libbluetooth-share -p /sbin/ldconfig
77
78 %files
79 %manifest %{name}.manifest
80 %defattr(-,root,root,-)
81 %{_bindir}/bluetooth-share
82 %{_datadir}/dbus-1/system-services/org.bluetooth.share.service
83 %{TZ_SYS_SHARE}/bt-ftp
84 %{TZ_SYS_SHARE}/%{name}
85
86 %files -n libbluetooth-share
87 %manifest libbluetooth-share.manifest
88 %defattr(-, root, root)
89 %{_libdir}/libbluetooth-share-api.so.0.*
90
91 %files -n libbluetooth-share-devel
92 %manifest libbluetooth-share-devel.manifest
93 %defattr(-, root, root)
94 %{_includedir}/bluetooth-share-api/bluetooth-share-api.h
95 %{_libdir}/libbluetooth-share-api.so
96 %{_libdir}/pkgconfig/bluetooth-share-api.pc