set dependencies to ecore and sqlite
[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): coreutils
13 Requires(post): smack
14 BuildRequires:  cmake
15 BuildRequires:  gettext-tools
16 BuildRequires:  pkgconfig(appcore-efl)
17 BuildRequires:  pkgconfig(bluetooth-api)
18 BuildRequires:  pkgconfig(glib-2.0)
19 BuildRequires:  pkgconfig(dlog)
20 BuildRequires:  pkgconfig(sqlite3)
21 BuildRequires:  pkgconfig(ecore)
22 # Same check as in tizen-extensions-crosswalk. A per-package or global
23 # bcond would be better, but for now let's follow Crosswalk's approach.
24 #%if "%{profile}" == "mobile"
25 #BuildRequires:  pkgconfig(calendar-service2)
26 #BuildRequires:  pkgconfig(contacts-service2)
27 #%endif
28 BuildRequires:  pkgconfig(vconf)
29 BuildRequires:  pkgconfig(pmapi)
30 BuildRequires:  pkgconfig(sysman)
31 BuildRequires:  pkgconfig(notification)
32 BuildRequires:  pkgconfig(appsvc)
33 BuildRequires:  pkgconfig(db-util)
34 BuildRequires:  pkgconfig(libprivilege-control)
35 BuildRequires:  pkgconfig(capi-content-media-content)
36 BuildRequires:  pkgconfig(libtzplatform-config)
37
38 %description
39 Bluetooth File Share Agent
40
41 %package -n libbluetooth-share
42 Summary:    Bluetooth share library
43 Group:      Development/Libraries
44 Requires:   %{name} = %{version}-%{release}
45
46 %description -n libbluetooth-share
47 Bluetooth share library
48
49 %package -n libbluetooth-share-devel
50 Summary:    Development package for libbluetooth-share
51 Group:      Development/Libraries
52 Requires:   %{name} = %{version}-%{release}
53
54 %description -n libbluetooth-share-devel
55 Development package for libbluetooth-share
56
57 %prep
58 %setup -q
59 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
60
61 %build
62 export CFLAGS+=" -fpie -fvisibility=hidden"
63 export LDFLAGS+=" -Wl,--rpath=/usr/%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
64
65 %cmake . \
66         -DTZ_SYS_ETC=%{TZ_SYS_ETC}
67 make
68
69 %install
70 %make_install
71 mkdir -p  %{buildroot}%{TZ_SYS_SHARE}/bt-ftp
72 install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_SYS_SHARE}/%{name}/ressources/init_db.sh
73
74 %post -n libbluetooth-share-devel -p /sbin/ldconfig
75
76 %post -n libbluetooth-share -p /sbin/ldconfig
77
78 %postun -n libbluetooth-share-devel -p /sbin/ldconfig
79
80 %postun -n libbluetooth-share -p /sbin/ldconfig
81
82 %files
83 %manifest %{name}.manifest
84 %defattr(-,root,root,-)
85 %{_bindir}/bluetooth-share
86 %{_datadir}/dbus-1/system-services/org.bluetooth.share.service
87 %{TZ_SYS_SHARE}/bt-ftp
88 %{TZ_SYS_SHARE}/%{name}
89
90 %files -n libbluetooth-share
91 %manifest libbluetooth-share.manifest
92 %defattr(-, root, root)
93 %{_libdir}/libbluetooth-share-api.so.0.*
94
95 %files -n libbluetooth-share-devel
96 %manifest libbluetooth-share-devel.manifest
97 %defattr(-, root, root)
98 %{_includedir}/bluetooth-share-api/bluetooth-share-api.h
99 %{_libdir}/libbluetooth-share-api.so
100 %{_libdir}/pkgconfig/bluetooth-share-api.pc