From 8ea613411939e224d9432f88f77c75980ce083e2 Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: May 08 2024 03:16:24 +0000 Subject: Build the test code without a rpath --- diff --git a/libusb1.spec b/libusb1.spec index fb13dca..f5f609a 100644 --- a/libusb1.spec +++ b/libusb1.spec @@ -9,7 +9,6 @@ BuildRequires: systemd-devel doxygen libtool BuildRequires: umockdev-devel BuildRequires: make BuildRequires: gcc -BuildRequires: patchelf # libusbx was removed in F34 Provides: libusbx = %{version}-%{release} Obsoletes: libusbx < %{version}-%{release} @@ -61,6 +60,7 @@ This package contains tests and examples for %{name}. %autosetup -p1 -n libusb-%{version} chmod -x examples/*.c mkdir -p m4 +sed -i '/AM_LDFLAGS = -static/d' tests/Makefile.am %build @@ -76,15 +76,11 @@ popd %install %{make_install} -patchelf --remove-rpath tests/init_context -patchelf --remove-rpath tests/set_option -patchelf --remove-rpath tests/stress -patchelf --remove-rpath tests/stress_mt mkdir -p $RPM_BUILD_ROOT%{_bindir} -install -m 755 tests/init_context $RPM_BUILD_ROOT%{_bindir}/libusb-test-init_context -install -m 755 tests/set_option $RPM_BUILD_ROOT%{_bindir}/libusb-test-set_option -install -m 755 tests/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress -install -m 755 tests/stress_mt $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress_mt +install -m 755 tests/.libs/init_context $RPM_BUILD_ROOT%{_bindir}/libusb-test-init_context +install -m 755 tests/.libs/set_option $RPM_BUILD_ROOT%{_bindir}/libusb-test-set_option +install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress +install -m 755 tests/.libs/stress_mt $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress_mt install -m 755 tests/.libs/umockdev $RPM_BUILD_ROOT%{_bindir}/libusb-test-umockdev install -m 755 examples/.libs/testlibusb \ $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb