File rlog.spec of Package rlog
#
# spec file for package rlog
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2010 Pascal Bleser <pascal.bleser@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/
#
%define sover 5
Name: rlog
Version: 1.4
Release: 0
Summary: C++ Logging Library
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/vgough/rlog
Source: rlog-%{version}.tar.bz2
Patch0: include_fix.patch
Patch1: 0002-Fix-FTBFS-with-autoconf-2.70.patch
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
%description
RLOG is a C++ library to manage message logging.
%package -n librlog%{sover}
Summary: C++ Logging Library
Group: System/Libraries
Provides: rlog = %{version}
Obsoletes: rlog < %{version}
%description -n librlog%{sover}
RLOG is a C++ library to manage message logging.
%package doc
Summary: Documentation for rlog, a C++ logging library
Group: Documentation/HTML
BuildArch: noarch
Obsoletes: librlog5-doc < %{version}-%{release}
Provides: librlog5-doc = %{version}-%{release}
%description doc
RLOG is a C++ library to manage message logging.
This subpackage contains the developer/API documentation.
%package devel
Summary: Headers for rlog, a C++ logging library
Group: Development/Libraries/C and C++
Requires: librlog%{sover} = %{version}
Requires: libstdc++-devel
Provides: librlog-devel = %{version}-%{release}
Obsoletes: librlog-devel < %{version}-%{release}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%prep
%autosetup -p1
%build
autoreconf -fiv
export CXXFLAGS="%{optflags} -fvisibility-inlines-hidden"
%configure
%make_build
%install
%make_install
rm -rf "%{buildroot}%{_datadir}/doc"
find %{buildroot} -type f -name "*.la" -delete -print
%post -n librlog%{sover} -p /sbin/ldconfig
%postun -n librlog%{sover} -p /sbin/ldconfig
%files -n librlog%{sover}
%{_libdir}/librlog.so.%{sover}
%{_libdir}/librlog.so.%{sover}.*
%license COPYING
%files doc
%doc AUTHORS ChangeLog README docs/html docs/latex/refman.pdf
%files devel
%{_libdir}/librlog.so
%{_includedir}/rlog
%{_libdir}/pkgconfig/librlog.pc
%changelog