%global debug_package %{nil} %if 0%{?fedora} >= 35 %bcond_without guile30 %else %bcond_with guile30 %endif %global srcname bytestructures Name: guile-%{srcname} Version: 2.0.1 Release: 1%{?dist} Summary: Structured access to bytevector contents License: GPLv3 URL: https://github.com/TaylanUB/scheme-bytestructures Source0: https://github.com/TaylanUB/scheme-bytestructures/archive/refs/tags/v%{version}.tar.gz BuildRequires: /usr/bin/autoreconf /usr/bin/aclocal /usr/bin/make %global _description %{expand: This library offers a system imitating the type system of the C programming language, to be used on bytevectors. C's type system works on raw memory, and ours works on bytevectors which are an abstraction over raw memory in Scheme. The system is in fact more powerful than the C type system, elevating types to first-class status.} %description %_description %package -n guile22-%{srcname} Summary: Structured access to bytevector contents BuildRequires: guile22-devel Requires: guile22 %description -n guile22-%{srcname} %_description %if %{with guile30} %package -n guile30-%{srcname} Summary: Structured access to bytevector contents BuildRequires: guile30-devel Requires: guile30 %description -n guile30-%{srcname} %_description %endif %prep %setup -qc mv scheme-bytestructures-%{version} guile22 %if %{with guile30} cp -a guile22 guile30 %endif %build pushd guile22 autoreconf --install %configure GUILE_EFFECTIVE_VERSION=2.2 \ GUILE=/usr/bin/guile2.2 \ GUILD=/usr/bin/guild2.2 \ GUILE_CONFIG=/usr/bin/guile-config2.2 %make_build popd %if %{with guile30} pushd guile30 autoreconf --install %configure GUILE_EFFECTIVE_VERSION=3.0 \ GUILE=/usr/bin/guile3.0 \ GUILD=/usr/bin/guild3.0 \ GUILE_CONFIG=/usr/bin/guile-config3.0 %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 guile22/LICENSE %doc guile22/README.md guile22/TODO.org %{_libdir}/guile/2.2/site-ccache/bytestructures %{_datadir}/guile/site/2.2/bytestructures %if %{with guile30} %files -n guile30-%{srcname} %license guile30/COPYING guile30/LICENSE %doc guile30/README.md guile30/TODO.org %{_libdir}/guile/3.0/site-ccache/bytestructures %{_datadir}/guile/site/3.0/bytestructures %endif