1 %define TZ_COMM_DATA /opt/usr/data/
2 %define upgrade_script_path /usr/share/upgrade/scripts
3 %define upgrade_data_path /usr/share/upgrade/data
6 Summary: Bluetooth file share Agent
9 Group: Network & Connectivity/Bluetooth
11 Source0: %{name}-%{version}.tar.gz
12 Source1001: %{name}.manifest
13 Source1002: libbluetooth-share.manifest
14 Source1003: libbluetooth-share-devel.manifest
15 Source1004: init_db.sh
16 Requires(post): coreutils
19 BuildRequires: gettext-tools
20 BuildRequires: pkgconfig(appcore-efl)
21 BuildRequires: pkgconfig(bluetooth-api)
22 BuildRequires: pkgconfig(glib-2.0)
23 BuildRequires: pkgconfig(aul)
24 BuildRequires: pkgconfig(dlog)
25 BuildRequires: pkgconfig(sqlite3)
26 BuildRequires: pkgconfig(ecore)
27 # Same check as in tizen-extensions-crosswalk. A per-package or global
28 # bcond would be better, but for now let's follow Crosswalk's approach.
29 #%if "%{profile}" == "mobile"
30 #BuildRequires: pkgconfig(calendar-service2)
31 #BuildRequires: pkgconfig(contacts-service2)
33 BuildRequires: pkgconfig(vconf)
34 BuildRequires: pkgconfig(syspopup-caller)
35 BuildRequires: pkgconfig(deviced)
36 BuildRequires: pkgconfig(notification)
37 BuildRequires: pkgconfig(appsvc)
38 BuildRequires: pkgconfig(db-util)
39 BuildRequires: pkgconfig(capi-content-media-content)
40 BuildRequires: pkgconfig(storage)
41 BuildRequires: pkgconfig(libtzplatform-config)
42 BuildRequires: pkgconfig(cynara-client)
43 BuildRequires: pkgconfig(cynara-session)
44 BuildRequires: pkgconfig(cynara-creds-dbus)
45 BuildRequires: pkgconfig(eventsystem)
46 BuildRequires: pkgconfig(storage)
49 Bluetooth File Share Agent
51 %package -n libbluetooth-share
52 Summary: Bluetooth share library
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
56 %description -n libbluetooth-share
57 Bluetooth share library
59 %package -n libbluetooth-share-devel
60 Summary: Development package for libbluetooth-share
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
64 %description -n libbluetooth-share-devel
65 Development package for libbluetooth-share
69 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
72 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
73 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
74 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
76 export CFLAGS+=" -fpie -fvisibility=hidden"
77 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
80 -DCMAKE_INSTALL_PREFIX=%{_prefix}
86 install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_COMM_DATA}/%{name}/init_db.sh
87 install -D -m 0644 packaging/bluetooth-share.service %{buildroot}%{_libdir}/systemd/system/bluetooth-share.service
89 mkdir -p %{buildroot}%{upgrade_script_path}
90 mkdir -p %{buildroot}%{upgrade_data_path}
91 cp -f packaging/bluetooth-share_upgrade.sh %{buildroot}%{upgrade_script_path}
92 cp -f packaging/init_db.sh %{buildroot}%{upgrade_data_path}
96 %{TZ_COMM_DATA}/%{name}/init_db.sh
97 ln -sf %{_libdir}/systemd/system/bluetooth-share.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
99 %post -n libbluetooth-share-devel -p /sbin/ldconfig
101 %post -n libbluetooth-share -p /sbin/ldconfig
103 %postun -n libbluetooth-share-devel -p /sbin/ldconfig
105 %postun -n libbluetooth-share -p /sbin/ldconfig
108 %manifest %{name}.manifest
109 %defattr(-,root,root,-)
110 %{_bindir}/bluetooth-share
111 #%{_datadir}/dbus-1/system-services/org.bluetooth.share.service
112 %{TZ_COMM_DATA}/%{name}/init_db.sh
113 %{_libdir}/systemd/system/bluetooth-share.service
114 %{upgrade_script_path}/bluetooth-share_upgrade.sh
115 %{upgrade_data_path}/init_db.sh
117 %files -n libbluetooth-share
118 %manifest libbluetooth-share.manifest
119 %defattr(-, root, root)
120 %{_libdir}/libbluetooth-share-api.so.0.*
122 %files -n libbluetooth-share-devel
123 %manifest libbluetooth-share-devel.manifest
124 %defattr(-, root, root)
125 %{_includedir}/bluetooth-share-api/bluetooth-share-api.h
126 %{_libdir}/libbluetooth-share-api.so
127 %{_libdir}/pkgconfig/bluetooth-share-api.pc