From: Wootak Jung Date: Mon, 18 Apr 2022 00:46:42 +0000 (+0900) Subject: Add certificate definition for PTS X-Git-Tag: accepted/tizen/unified/20220503.071451~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48cca240a63d95f6b2ed10fbde3088a6b0dfc49f;p=platform%2Fupstream%2Fbluez.git Add certificate definition for PTS Change-Id: I3619e2dc82cdd7253e08109ee1345e9e1527c1fd --- diff --git a/packaging/bluez.spec b/packaging/bluez.spec index aefe543..ae19e81 100755 --- a/packaging/bluez.spec +++ b/packaging/bluez.spec @@ -3,6 +3,8 @@ %global __provides_exclude_from ^(.*\\.tm1)$ #%define __spec_check_pre exit 0 +%define unified true +%define certificate false #%define with_libcapng --enable-capng %define _libpath /usr/lib @@ -61,6 +63,7 @@ Recommends: %{name}-profile_common = %{version}-%{release} %description The Bluetooth stack for Linux. +%if %{unified} == true %package extension-bredr Summary: Bluez extension for BREDR functionality Requires: %{name} = %{version}-%{release} @@ -74,6 +77,7 @@ Requires: %{name} = %{version}-%{release} Conflicts: %{name}-extension-bredr = %{version}-%{release} %description extension-le Bluez extension for LE functionality +%endif %package -n obexd Summary: OBEX Server A basic OBEX server implementation @@ -175,6 +179,7 @@ autoreconf -fiv export CFLAGS_DEFAULT="$CFLAGS" +%if %{unified} == true # Add GCC9 exception export CFLAGS+=" -Wno-stringop-truncation -Wno-format-truncation -Wno-address-of-packed-member" @@ -302,7 +307,7 @@ cp -a %{buildroot}%{_libexecdir}/bluetooth/bluetoothd bredr/ make distclean autoreconf -fiv - +%endif export CFLAGS="$CFLAGS_DEFAULT" # Add GCC9 exception @@ -321,6 +326,10 @@ echo x86_64 export CFLAGS+=" -DARCH64" %endif +%if %{certificate} == true +export CFLAGS+=" -DTIZEN_CERTIFICATE" +%endif + %reconfigure --disable-static \ --sysconfdir=%{_sysconfdir} \ --localstatedir=%{_localstatedir} \ @@ -367,6 +376,7 @@ make check %install %make_install +%if %{unified} == true pushd bredr for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.bredr"; done popd @@ -374,11 +384,14 @@ popd pushd le for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.le"; done popd +%endif # bluez-test rm -rvf $RPM_BUILD_ROOT/%{_libdir}/gstreamer-* #install --mode=0755 -D %{S:4} $RPM_BUILD_ROOT/usr/lib/udev/bluetooth.sh +%if %{unified} == true install --mode=0644 -D %{S:7} $RPM_BUILD_ROOT/%{_sysconfdir}/modprobe.d/50-bluetooth.conf +%endif # no idea why this is suddenly necessary... install --mode 0755 -d $RPM_BUILD_ROOT/var/lib/bluetooth @@ -423,6 +436,7 @@ install -D -m 0644 obexd/src/obex.service %{buildroot}%{_libpath}/systemd/system install -D -m 0644 src/bluetooth.service %{buildroot}%{_libpath}/systemd/system/bluez-start.service +%if %{unified} == true %post -n bluez-extension-bredr pushd %{_libexecdir}/bluetooth for FILE in bluetoothd.bredr; do mv "$FILE" "${FILE%.bredr}"; done @@ -434,6 +448,7 @@ pushd %{_libexecdir}/bluetooth for FILE in bluetoothd.le; do mv "$FILE" "${FILE%.le}"; done popd /sbin/ldconfig +%endif %files %manifest %{name}.manifest @@ -468,6 +483,7 @@ popd %{_unitdir}/bluez-start.service %exclude %{_unitdir}/bluetooth.service +%if %{unified} == true %files -n bluez-extension-bredr %manifest %{name}.manifest %defattr(-, root, root) @@ -481,6 +497,7 @@ popd %dir /var/lib/bluetooth %dir %{_sysconfdir}/modprobe.d %config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf +%endif %files mesh %manifest %{name}.manifest