4 Summary: Bluetooth file share Agent
7 Group: Connectivity/Bluetooth
8 License: Apache License, Version 2.0
9 Source0: %{name}-%{version}.tar.gz
10 Source1001: %{name}.manifest
11 Source1002: libbluetooth-share.manifest
12 Source1003: libbluetooth-share-devel.manifest
14 Requires(post): coreutils
15 Requires(post): sqlite
18 BuildRequires: gettext-tools
19 BuildRequires: pkgconfig(appcore-efl)
20 BuildRequires: pkgconfig(bluetooth-api)
21 BuildRequires: pkgconfig(glib-2.0)
22 BuildRequires: pkgconfig(aul)
23 BuildRequires: pkgconfig(dlog)
24 BuildRequires: pkgconfig(calendar-service2)
25 BuildRequires: pkgconfig(contacts-service2)
26 BuildRequires: pkgconfig(vconf)
27 BuildRequires: pkgconfig(syspopup-caller)
28 BuildRequires: pkgconfig(pmapi)
29 BuildRequires: pkgconfig(sysman)
30 BuildRequires: pkgconfig(notification)
31 BuildRequires: pkgconfig(appsvc)
32 BuildRequires: pkgconfig(db-util)
33 BuildRequires: pkgconfig(libprivilege-control)
34 BuildRequires: pkgconfig(capi-content-media-content)
37 Bluetooth File Share Agent
39 %package -n libbluetooth-share
40 Summary: Bluetooth share library
41 Group: Development/Libraries
42 Requires: %{name} = %{version}-%{release}
44 %description -n libbluetooth-share
45 Bluetooth share library
47 %package -n libbluetooth-share-devel
48 Summary: Development package for libbluetooth-share
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
52 %description -n libbluetooth-share-devel
53 Development package for libbluetooth-share
57 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
60 export CFLAGS+=" -fpie -fvisibility=hidden"
61 export LDFLAGS+=" -Wl,--rpath=/usr/%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
68 mkdir -p %{buildroot}%{_optdir}/share/bt-ftp
71 # For the FTP server folder
72 if [ ! -e /opt/share/bt-ftp ]
74 mkdir -p /opt/share/bt-ftp
77 if [ ! -e /opt/share/bt-ftp/Media ]
79 ln -s /opt/usr/media /opt/share/bt-ftp/Media
82 if [ ! -e /opt/share/bt-ftp/SD_External ]
84 ln -s /opt/storage/sdcard /opt/share/bt-ftp/SD_External
87 if [ ! -f /opt/usr/dbspace/.bluetooth_trasnfer.db ]
89 sqlite3 /opt/usr/dbspace/.bluetooth_trasnfer.db 'PRAGMA journal_mode = PERSIST;
90 create table if not exists inbound (
91 id INTEGER PRIMARY KEY autoincrement,
96 timestamp INTEGER default 0,
101 create table if not exists outbound (
102 id INTEGER PRIMARY KEY autoincrement,
107 timestamp INTEGER default 0,
115 chown :5000 /opt/usr/dbspace/.bluetooth_trasnfer.db
116 chown :5000 /opt/usr/dbspace/.bluetooth_trasnfer.db-journal
117 chmod 660 /opt/usr/dbspace/.bluetooth_trasnfer.db
118 chmod 660 /opt/usr/dbspace/.bluetooth_trasnfer.db-journal
120 if [ -f /usr/lib/rpm-plugins/msm.so ]
122 chsmack -a 'bt_share::db' /opt/usr/dbspace/.bluetooth_trasnfer.db
123 chsmack -a 'bt_share::db' /opt/usr/dbspace/.bluetooth_trasnfer.db-journal
126 %post -n libbluetooth-share-devel -p /sbin/ldconfig
128 %post -n libbluetooth-share -p /sbin/ldconfig
130 %postun -n libbluetooth-share-devel -p /sbin/ldconfig
132 %postun -n libbluetooth-share -p /sbin/ldconfig
135 %manifest %{name}.manifest
136 /opt/etc/smack/accesses.d/bluetooth-share.rule
137 %defattr(-,root,root,-)
138 %{_bindir}/bluetooth-share
139 %{_datadir}/dbus-1/system-services/org.bluetooth.share.service
140 %{_optdir}/share/bt-ftp
142 %files -n libbluetooth-share
143 %manifest libbluetooth-share.manifest
144 %defattr(-, root, root)
145 %{_libdir}/libbluetooth-share-api.so.0.*
147 %files -n libbluetooth-share-devel
148 %manifest libbluetooth-share-devel.manifest
149 %defattr(-, root, root)
150 /usr/include/bluetooth-share-api/bluetooth-share-api.h
151 %{_libdir}/libbluetooth-share-api.so
152 %{_libdir}/pkgconfig/bluetooth-share-api.pc