File jose.spec of Package jose

#
# spec file for package jose
#
# Copyright (c) 2022 SUSE LLC
#
# 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:           jose
Version:        11
Release:        0
Summary:        C-language implementation of Javascript Object Signing and Encryption
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        Apache-2.0
URL:            https://github.com/latchset/jose
Source:         %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz
BuildRequires:  meson
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(jansson)
BuildRequires:  pkgconfig(libcrypto)

%description
José is a C-language implementation of the Javascript Object Signing and Encryption standards.
Specifically, José aims towards implementing the following standards:
RFC 7515 - JSON Web Signature (JWS)
RFC 7516 - JSON Web Encryption (JWE)
RFC 7517 - JSON Web Key (JWK)
RFC 7518 - JSON Web Algorithms (JWA)
RFC 7519 - JSON Web Token (JWT)
RFC 7520 - Examples of ... JOSE
RFC 7638 - JSON Web Key (JWK) Thumbprint
José is extensively tested against the RFC test vectors.

%package -n lib%{name}0
Summary:        Library implementing JSON Object Signing and Encryption
Conflicts:      jansson < 2.10
Provides:       lib%{name}-openssl = %{version}
Obsoletes:      lib%{name}-openssl < %{version}
Provides:       lib%{name}-zlib = %{version}
Obsoletes:      lib%{name}-zlib < %{version}

%description -n lib%{name}0
This package contains a C library for performing JOSE operations.

%package -n lib%{name}-devel
Summary:        Development files for lib%{name}
Requires:       lib%{name}0 = %{version}
Requires:       pkgconfig
Requires:       pkgconfig(jansson)
Provides:       lib%{name}-openssl-devel = %{version}
Obsoletes:      lib%{name}-openssl-devel < %{version}
Provides:       lib%{name}-zlib-devel = %{version}
Obsoletes:      lib%{name}-zlib-devel < %{version}

%description -n lib%{name}-devel
This package contains development files for lib%{name}.

%prep
%autosetup

%build
%meson
%meson_build

%install
%meson_install

%post -n lib%{name}0 -p /sbin/ldconfig
%postun -n lib%{name}0 -p /sbin/ldconfig

%files
%license COPYING
%doc README.md
%{_bindir}/%{name}

%files -n lib%{name}0
%{_libdir}/lib%{name}.so.*

%files -n lib%{name}-devel
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/jose*.3*

%changelog

openSUSE Build Service is sponsored by