File rem.spec of Package failed_rem

Name:           rem
Version:        2.10.0
Release:        1.1
Summary:        REM - Resource and Event Monitor (example spec)

License:        MIT
URL:            https://example.org/rem
Source0:        %{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  re-devel
BuildRequires:  libopenssl-devel
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig

# If packaging on openSUSE/SUSE, ensure proper policy for C++ builds:
%if 0%{?suse_version}
BuildRequires:  libstdc++-devel
%endif

%description
REM - Resource and Event Monitor
(Placeholder description; real upstream metadata should be used)

%prep
%setup -q

%build
# Reproduce the upstream CMake invocation used in the build logs.
mkdir -p build
cd build
cmake .. \
  -GUnix\ Makefiles \
  -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  -DCMAKE_INSTALL_BINDIR:PATH=bin \
  -DCMAKE_INSTALL_LIBDIR:PATH=lib64 \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DBUILD_SHARED_LIBS:BOOL=ON
make -j%{?jobs}

%install
rm -rf %{buildroot}
cd build
make DESTDIR=%{buildroot} install

%files
%defattr(-,root,root,-)
%doc README* CHANGELOG* LICENSE*
/usr/bin/*
/usr/lib64/*

%changelog
* Tue Aug 12 2025 Packager <packager@example.org> - 2.10.0-1.1
- Add BuildRequires for C++ compiler (gcc-c++) so CMake can enable C++ language during configure.
openSUSE Build Service is sponsored by