Correct the db file and text domain location
[platform/core/connectivity/bluetooth-share.git] / packaging / bluetooth-share.spec
1 %define TZ_SYS_SHARE /opt/home/owner/data/
2
3 Name:       bluetooth-share
4 Summary:    Bluetooth file share Agent
5 Version:    0.0.47
6 Release:    0
7 Group:      Network & Connectivity/Bluetooth
8 License:    Apache-2.0
9 Source0:    %{name}-%{version}.tar.gz
10 Source1001: %{name}.manifest
11 Source1002: libbluetooth-share.manifest
12 Source1003: libbluetooth-share-devel.manifest
13 Source1004: init_db.sh
14 Requires(post): coreutils
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(sqlite3)
24 BuildRequires:  pkgconfig(ecore)
25 # Same check as in tizen-extensions-crosswalk. A per-package or global
26 # bcond would be better, but for now let's follow Crosswalk's approach.
27 #%if "%{profile}" == "mobile"
28 #BuildRequires:  pkgconfig(calendar-service2)
29 #BuildRequires:  pkgconfig(contacts-service2)
30 #%endif
31 BuildRequires:  pkgconfig(vconf)
32 BuildRequires:  pkgconfig(syspopup-caller)
33 BuildRequires:  pkgconfig(deviced)
34 BuildRequires:  pkgconfig(notification)
35 BuildRequires:  pkgconfig(appsvc)
36 BuildRequires:  pkgconfig(db-util)
37 BuildRequires:  pkgconfig(capi-content-media-content)
38 BuildRequires:  pkgconfig(storage)
39 BuildRequires:  pkgconfig(libtzplatform-config)
40 BuildRequires:  pkgconfig(cynara-client)
41 BuildRequires:  pkgconfig(cynara-session)
42 BuildRequires:  pkgconfig(cynara-creds-dbus)
43 BuildRequires:  pkgconfig(eventsystem)
44
45 %description
46 Bluetooth File Share Agent
47
48 %package -n libbluetooth-share
49 Summary:    Bluetooth share library
50 Group:      Development/Libraries
51 Requires:   %{name} = %{version}-%{release}
52
53 %description -n libbluetooth-share
54 Bluetooth share library
55
56 %package -n libbluetooth-share-devel
57 Summary:    Development package for libbluetooth-share
58 Group:      Development/Libraries
59 Requires:   %{name} = %{version}-%{release}
60
61 %description -n libbluetooth-share-devel
62 Development package for libbluetooth-share
63
64 %prep
65 %setup -q
66 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
67
68 %build
69 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
70 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
71 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
72
73 export CFLAGS+=" -fpie -fvisibility=hidden"
74 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
75
76 %cmake . \
77         -DCMAKE_INSTALL_PREFIX=%{_prefix}
78 make
79
80 %install
81 %make_install
82
83 mkdir -p  %{buildroot}%{TZ_SYS_SHARE}/bt-ftp
84 install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_SYS_SHARE}/%{name}/init_db.sh
85
86 %post
87 /sbin/ldconfig
88 %{TZ_SYS_SHARE}/%{name}/init_db.sh
89
90 %post -n libbluetooth-share-devel -p /sbin/ldconfig
91
92 %post -n libbluetooth-share -p /sbin/ldconfig
93
94 %postun -n libbluetooth-share-devel -p /sbin/ldconfig
95
96 %postun -n libbluetooth-share -p /sbin/ldconfig
97
98 %files
99 %manifest %{name}.manifest
100 %defattr(-,root,root,-)
101 %{_bindir}/bluetooth-share
102 %{_datadir}/dbus-1/system-services/org.bluetooth.share.service
103 %{TZ_SYS_SHARE}/bt-ftp
104 %{TZ_SYS_SHARE}/%{name}
105
106 %files -n libbluetooth-share
107 %manifest libbluetooth-share.manifest
108 %defattr(-, root, root)
109 %{_libdir}/libbluetooth-share-api.so.0.*
110
111 %files -n libbluetooth-share-devel
112 %manifest libbluetooth-share-devel.manifest
113 %defattr(-, root, root)
114 %{_includedir}/bluetooth-share-api/bluetooth-share-api.h
115 %{_libdir}/libbluetooth-share-api.so
116 %{_libdir}/pkgconfig/bluetooth-share-api.pc