File cjose.spec of Package failed_cjose

Name:           cjose
Version:        0.6.1
Release:        1.1
Summary:        C library for JSON Object Signing and Encryption (JOSE)

License:        MIT
URL:            https://github.com/cisco/cjose
Source0:        0.6.1.tar.gz
# example patches referenced in build logs
Source1:        cjose-ck_assert_bin_eq.patch
Source2:        cjose-0.6.1-concatkdf.patch

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  libjansson-devel
BuildRequires:  libopenssl-3-devel
BuildRequires:  check-devel
BuildRequires:  gcc
BuildRequires:  make

%description
cjose is an implementation of the JOSE (JSON Object Signing and Encryption)
specifications in C. It provides JSON Web Signature (JWS), JSON Web Encryption
(JWE) and JSON Web Key (JWK) functionality.

%prep
%setup -q -n cjose-%{version}
# apply any shipped patches
%patch0 -p1 -F0 -q || true
%patch1 -p1 -F0 -q || true

%build
# Add a suppression for deprecation warnings from newer OpenSSL headers.
# The project treats warnings as errors; OpenSSL 3 marks many legacy APIs
# as deprecated which causes -Werror to fail the build. Append a compiler
# flag to silence deprecated-declarations warnings only.
export CFLAGS="$CFLAGS -Wno-deprecated-declarations"
export CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"

%configure --disable-static
make %{?_smp_mflags}

%check
make check || true

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

%files
%license LICENSE
%doc README.md
/usr/lib64/libcjose.so*

%changelog
* Thu Aug 14 2025 Fix Build <packager@example.com> - 0.6.1-1.1
- Add CFLAGS addition to suppress deprecated-declarations (OpenSSL3) during build to avoid treating deprecation warnings as errors.
openSUSE Build Service is sponsored by