%global debug_package %{nil} %if 0%{?fedora} >= 35 %bcond_without guile30 %else %bcond_with guile30 %endif # This is a temporary work-around until the fixes for # https://github.com/rpm-software-management/rpm/issues/1765 land in # Fedora. %global __brp_strip /bin/true %global srcname json Name: guile-%{srcname} Version: 4.7.3 Release: 1%{?dist} Summary: JSON module for Guile License: GPLv3 URL: https://github.com/aconchillo/guile-json Source0: https://github.com/aconchillo/guile-json/archive/%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: /usr/bin/make %global _description %{expand: guile-json is a JSON module for Guile. It supports parsing and building JSON documents according to the http://json.org specification. - Complies with http://json.org specification. - Builds JSON documents programmatically using scheme data types. - Allows JSON pretty printing.} %description %_description %package -n guile22-%{srcname} Summary: JSON module for Guile BuildRequires: guile22-devel Requires: guile22 Provides: guile-%{srcname} = %{version}-%{release} Obsoletes: guile-%{srcname} <= 4.5.2-3 %description -n guile22-%{srcname} %_description %if %{with guile30} %package -n guile30-%{srcname} Summary: JSON module for Guile BuildRequires: guile30-devel Requires: guile30 %description -n guile30-%{srcname} %_description %endif %prep %setup -qc mv %{name}-%{version} guile22 %if %{with guile30} cp -a guile22 guile30 %endif %build pushd guile22 autoreconf -vif GUILE_EFFECTIVE_VERSION=2.2 export GUILE_EFFECTIVE_VERSION %configure %make_build popd %if %{with guile30} pushd guile30 autoreconf -vif GUILE_EFFECTIVE_VERSION=3.0 export GUILE_EFFECTIVE_VERSION %configure %make_build popd %endif %install rm -rf $RPM_BUILD_ROOT pushd guile22 %make_install popd %if %{with guile30} pushd guile30 %make_install popd %endif find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %files -n guile22-%{srcname} %license guile22/COPYING %doc guile22/AUTHORS guile22/NEWS guile22/README.md %{_libdir}/guile/2.2/site-ccache/%{srcname}.go %{_libdir}/guile/2.2/site-ccache/%{srcname} %{_datadir}/guile/site/2.2/%{srcname}.scm %{_datadir}/guile/site/2.2/%{srcname} %if %{with guile30} %files -n guile30-%{srcname} %license guile30/COPYING %doc guile30/AUTHORS guile30/NEWS guile30/README.md %{_libdir}/guile/3.0/site-ccache/%{srcname}.go %{_libdir}/guile/3.0/site-ccache/%{srcname} %{_datadir}/guile/site/3.0/%{srcname}.scm %{_datadir}/guile/site/3.0/%{srcname} %endif