%define keepstatic 1
+%define testsdir %{_libdir}/libunwind
Name: libunwind
BuildRequires: gcc-c++
A portable and efficient C programming interface (API) to determine the
call-chain of a program.
+%package tests
+Summary: Package with binaries and data for libunwind tests
+
+%description tests
+This package contains installable tests in Bash.
+
%prep
%setup -q
cp %{SOURCE1001} .
export CFLAGS="%optflags -U_FORTIFY_SOURCE"
%configure
make %{?_smp_mflags}
+make -C tests test-ptrace
%install
# Check that ln did not create a dangling link
stat %{buildroot}/$(readlink -f "%{buildroot}/%{_libdir}/libunwind.so");
+mkdir -p %{buildroot}%{testsdir}
+install -m 750 tests/.libs/test-ptrace %{buildroot}%{testsdir}
+install -m 750 tests/test-ptrace-misc %{buildroot}%{testsdir}
+install -m 750 tests/run-ptrace-misc %{buildroot}%{testsdir}
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%doc %{_mandir}/man?/*
%changelog
+
+%files tests
+%{testsdir}/*