File libbacktrace.spec of Package libbacktrace

#
# spec file for package libbacktrace
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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:           libbacktrace
Version:        1.0_git20250928
Release:        0
Summary:        Backtrace C library
License:        BSD-3-Clause
Group:          System/Libraries
URL:            https://github.com/ianlancetaylor/%{name}
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  automake
BuildRequires:  libtool

%define soname 0
%define description_text This is a C library that may be linked into a C/C++ program to produce symbolic backtraces.

%description
%{description_text}

%package -n %{name}%{soname}
Summary:        Backtrace C library
Group:          System/Libraries

%description -n %{name}%{soname}
%{description_text}

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{name}%{soname} = %{version}

%description devel
The %{name}-devel package contains libraries and header files for developing applications that use %{name}.

%prep
%setup -q

%build
%{_bindir}/autoreconf -fi
%configure --disable-static --enable-shared --enable-silent-rules
%{__make} %{?_smp_mflags}
%{__strip} -s .libs/%{name}.so.%{soname}.*

%install
%{__make} install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec %{__rm} -f {} ';'

%check
# %%{__make} check

%post -n %{name}%{soname}
/sbin/ldconfig

%postun -n %{name}%{soname}
/sbin/ldconfig

%files -n %{name}%{soname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/*.so
%doc README.md
%license LICENSE

%changelog
openSUSE Build Service is sponsored by