# # spec file for package yder # # Copyright (c) 2023 SUSE LLC # Copyright (c) 2018-2023, Martin Hauke # # 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/ # # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define sover 1_1 %define libname %mklibname %{name} %{sover} %define develname %mklibname %{name} -d Name: rhonabwy Version: 1.1.13 Release: %mkrel 1.3 Summary: Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT # Example programs in subfolder examples/ are licensed under MIT License: LGPL-2.1-or-later Group: Development/Languages/C and C++ URL: https://github.com/babelouest/%{name} Source: https://github.com/babelouest/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: make BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: pkgconfig(liborcania) >= 2.3.3 BuildRequires: pkgconfig(libyder) >= 1.4.20 BuildRequires: pkgconfig(jansson) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(nettle) BuildRequires: pkgconfig(zlib) BuildRequires: (pkgconfig(gmp) or gmp-devel) %description %{summary}. %package -n %libname Summary: Runtime library for %{name} Group: System/Libraries %description -n %libname %{summary}. %package -n %develname Summary: Header files for %{name} Group: Development/Libraries/C and C++ Requires: %libname = %{version} %description -n %develname Development and header files for %{name}. %prep %setup -q %build libs="hogweed nettle" if pkg-config --exists gmp; then libs="gmp $libs" fi EXTRA_CFLAGS="-Wno-attribute-warning -Wno-int-conversion $(pkg-config --cflags "$libs")" EXTRA_LDFLAGS="$(pkg-config --libs "$libs")" sed -i -e "s/^\(LIBS\s*=.*\)\$/\1 $EXTRA_LDFLAGS/" tools/rnbyc/Makefile %{__make} ADDITIONALFLAGS="-g $EXTRA_CFLAGS" LDFLAGS="$EXTRA_LDFLAGS" %install sed -i -e 's#@CMAKE_INSTALL_PREFIX@#%{_prefix}#' librhonabwy.pc.in mkdir -p %{buildroot}/lib mkdir -p %{buildroot}%{_prefix} %make_install PREFIX=%{_prefix} mv %{buildroot}/bin %{buildroot}%{_bindir} mv %{buildroot}/include %{buildroot}%{_includedir} mv %{buildroot}/lib %{buildroot}%{_libdir} ln -fs lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so mkdir -p %{buildroot}/%{_datadir} && mv %{buildroot}/man %{buildroot}%{_mandir} %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %files %{_bindir}/rnbyc %{_mandir}/man1/rnbyc.1* %files -n %libname %{_libdir}/librhonabwy.so.* %files -n %develname %{_includedir}/%{name}.h %{_includedir}/%{name}-cfg.h %{_libdir}/librhonabwy.so %{_libdir}/pkgconfig/librhonabwy.pc