Files needed to develop applications for the BlueZ Bluetooth protocol
stack.
+%package extension-bredr
+Summary: Bluez extension for BREDR functionality
+Conflicts: %{name}-extension-le = %{version}-%{release}
+%description extension-bredr
+Bluez extension for BREDR functionality
+
+%package extension-le
+Summary: Bluez extension for LE functionality
+Conflicts: %{name}-extension-bredr = %{version}-%{release}
+%description extension-le
+Bluez extension for LE functionality
+
%package -n libbluetooth
Summary: Bluetooth Libraries
License: GPL-2.0+
# TIZEN_FEATURE_BLUEZ_CONFIRM_ONLY: only in src/device.c ==> RUNTIME! (profile.h)
#endif
+
+# For LE only
+
export LDFLAGS=" -lncurses -Wl,--as-needed "
export CFLAGS+=" -DTIZEN_FEATURE_BLUEZ_MODIFY -DTIZEN_FEATURE_BLUEZ_PBAP_SIM -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET"
export CFLAGS_DEFAULT="$CFLAGS"
-# TIZEN_FEATURE_BLUEZ_SPRD_QOS: only in profiles/audio/avdtp.c ==> RUNTIME! (profile.h)
-# TIZEN_FEATURE_BLUEZ_SPRD_PAGE_SCAN: src/adapter.c ==> RUNTIME! (profile.h)
+export CFLAGS="$CFLAGS_DEFAULT"
+
+%reconfigure --disable-static \
+ --sysconfdir=%{_sysconfdir} \
+ --localstatedir=%{_localstatedir} \
+ --with-systemdsystemunitdir=%{_libpath}/systemd/system \
+ --with-systemduserunitdir=%{_libpath}/systemd/user \
+ --libexecdir=%{_libexecdir} \
+ --enable-debug \
+ --enable-pie \
+ --enable-serial \
+ --enable-usb=no \
+ --enable-tools \
+ --disable-bccmd \
+ --enable-pcmcia=no \
+ --enable-hid2hci=no \
+ --enable-alsa=no \
+ --enable-gstreamer=no \
+ --disable-dfutool \
+ --disable-cups \
+ --enable-proximity=yes \
+ --enable-tds=yes \
+ --enable-dbusoob \
+ --enable-test \
+ --with-telephony=tizen \
+ --enable-obex \
+ --enable-library \
+ --enable-gatt \
+ --enable-experimental \
+ --enable-autopair=no \
+ --enable-tizenunusedplugin=no
+
+make %{?_smp_mflags} all V=1
+
+mkdir -p le
+
+%make_install
+cp -a %{buildroot}%{_libexecdir}/bluetooth/bluetoothd le/
+
+
+# For BREDR only
+
+export LDFLAGS=" -lncurses -Wl,--as-needed "
+export CFLAGS+=" -DTIZEN_FEATURE_BLUEZ_MODIFY -DTIZEN_FEATURE_BLUEZ_PBAP_SIM -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET"
+export CFLAGS_DEFAULT="$CFLAGS"
+
+export CFLAGS="$CFLAGS_DEFAULT"
+
+%reconfigure --disable-static \
+ --sysconfdir=%{_sysconfdir} \
+ --localstatedir=%{_localstatedir} \
+ --with-systemdsystemunitdir=%{_libpath}/systemd/system \
+ --with-systemduserunitdir=%{_libpath}/systemd/user \
+ --libexecdir=%{_libexecdir} \
+ --enable-debug \
+ --enable-pie \
+ --enable-serial \
+ --enable-input \
+ --enable-usb=no \
+ --enable-tools \
+ --disable-bccmd \
+ --enable-pcmcia=no \
+ --enable-hid2hci=no \
+ --enable-alsa=no \
+ --enable-gstreamer=no \
+ --disable-dfutool \
+ --disable-cups \
+ --enable-health=yes \
+ --enable-dbusoob \
+ --enable-test \
+ --with-telephony=tizen \
+ --enable-obex \
+ --enable-library \
+ --enable-experimental \
+ --enable-autopair=no \
+ --enable-hid=yes \
+ --enable-bredr=yes \
+ --enable-tizenunusedplugin=no
+
+make %{?_smp_mflags} all V=1
+
+mkdir -p bredr
+
+%make_install
+cp -a %{buildroot}%{_libexecdir}/bluetooth/bluetoothd bredr/
+
+
+# For BREDR + LE
+
+export LDFLAGS=" -lncurses -Wl,--as-needed "
+export CFLAGS+=" -DTIZEN_FEATURE_BLUEZ_MODIFY -DTIZEN_FEATURE_BLUEZ_PBAP_SIM -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET"
+export CFLAGS_DEFAULT="$CFLAGS"
export CFLAGS="$CFLAGS_DEFAULT"
--enable-gatt \
--enable-experimental \
--enable-autopair=no \
-%if "%{?profile}" == "wearable"
- --enable-wearable \
-%endif
--enable-hid=yes \
+ --enable-bredr=yes \
--enable-tizenunusedplugin=no
-# The if/endif for wearable above if only for PRODUCT optimization
-
-# enable-wearable disables "TIZEN_HID_PLUGIN / TIZEN_UNUSED_PLUGIN" (input / hog)
-# TIZEN_UNUSED_PLUGIN is "no" regardless of enable-wearable.
-# TIZEN_HID_PLUGIN only matters.
-# enable-network is not used in configure.
make %{?_smp_mflags} all V=1
%install
%make_install
+pushd bredr
+for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.bredr"; done
+popd
+
+pushd le
+for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.le"; done
+popd
+
+
# bluez-test
rm -rvf $RPM_BUILD_ROOT/%{_libdir}/gstreamer-*
#install --mode=0755 -D %{S:4} $RPM_BUILD_ROOT/usr/lib/udev/bluetooth.sh
%postun -n libbluetooth -p /sbin/ldconfig
+%post -n bluez-extension-bredr
+pushd %{_libexecdir}/bluetooth
+for FILE in bluetoothd.bredr; do mv "$FILE" "${FILE%.bredr}"; done
+popd
+/sbin/ldconfig
+
+%post -n bluez-extension-le
+pushd %{_libexecdir}/bluetooth
+for FILE in bluetoothd.le; do mv "$FILE" "${FILE%.le}"; done
+popd
+/sbin/ldconfig
+
%files
%manifest %{name}.manifest
%defattr(-, root, root)
%{_bindir}/hciattach
%{_bindir}/hciconfig
%{_libexecdir}/bluetooth/bluetoothd
+%exclude %{_libexecdir}/bluetooth/bluetoothd.bredr
+%exclude %{_libexecdir}/bluetooth/bluetoothd.le
%{_bindir}/bccmd
#%{_sbindir}/hid2hci
%dir /usr/lib/udev
/usr/lib/udev/*
%{upgrade_script_path}/500.bluez_upgrade.sh
+%files -n bluez-extension-bredr
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_libexecdir}/bluetooth/bluetoothd.bredr
+
+%files -n bluez-extension-le
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_libexecdir}/bluetooth/bluetoothd.le
+
#test -2
%exclude /%{_libpath}/systemd/system/bluetooth.service
%exclude %{_libpath}/systemd/system/multi-user.target.wants/bluetooth.service
%config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf
-
-
%files devel
%manifest %{name}.manifest
%defattr(-, root, root)