File satyr.spec of Package satyr
#
# spec file for package satyr
#
# Copyright (c) 2023-2024 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: satyr
Version: 0.43+0
Release: 0
Summary: Tools to create anonymous, machine-friendly problem reports
License: GPL-2.0-or-later
URL: https://github.com/abrt/satyr
Source0: %{name}-%{version}.tar.xz
BuildRequires: binutils-devel
BuildRequires: libtool
BuildRequires: doxygen
BuildRequires: pkgconfig
BuildRequires: make
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: gdb
BuildRequires: gperf
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libdw)
BuildRequires: pkgconfig(libelf)
BuildRequires: pkgconfig(rpm)
%description
Satyr is a library that can be used to create and process
microreports.
%package devel
Summary: Development libraries for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
Development libraries and headers for %{name}.
%prep
%autosetup -p1
# Stacktrace test won't work on virtual build machine
sed -i '/core_stacktrace/d' ./tests/Makefile.am
%build
echo %{version} > satyr-version
autoreconf -fi
%configure \
--without-python3 \
--disable-static \
--enable-doxygen-docs
%make_build
%install
%make_install
# Remove installed readme as we install as %%docs
rm -rf %{buildroot}/usr/share/doc/satyr/README.md
# Clean up
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%check
make check|| {
# find and print the logs of failed test
# do not cat tests/testsuite.log because it contains a lot of bloat
cat tests/test-suite.log
find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
exit 1
}
%post -p /usr/sbin/ldconfig
%postun -p /usr/sbin/ldconfig
%files
%doc README.md NEWS
%license COPYING
%{_bindir}/satyr
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_libdir}/lib*.so.*
%files devel
# The complex pattern below (instead of simlpy *) excludes Makefile{.am,.in}:
%doc apidoc/html/*.{html,png,css,js}
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%changelog