%global debug_package %{nil} %if 0%{?fedora} >= 35 %bcond_without guile30 %else %bcond_with guile30 %endif %global srcname dsv Name: guile-%{srcname} Version: 0.7.2 Release: 1%{?dist} Summary: Delimiter-separated values (DSV) format parser for Guile License: GPLv3 URL: https://github.com/artyom-poptsov/guile-dsv Source0: https://github.com/artyom-poptsov/guile-dsv/archive/refs/tags/v%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: /usr/bin/make BuildRequires: help2man %global _description %{expand: Guile-DSV is a GNU Guile module for working with the delimiter-separated values (DSV) data format. Guile-DSV supports the Unix-style DSV format and RFC 4180 format. Also Guile-DSV ships with a program named dsv (source code is here: utils/dsv.in) that allows to read and process DSV format (including delimiter change and conversion from one standard to another.)} %description %_description %package -n guile22-%{srcname} Summary: Delimiter-separated values (DSV) format parser for Guile BuildRequires: guile22-devel guile22-lib guile22-smc Requires: guile22 guile22-lib guile22-smc guile-dsv-data Recommends: guile-dsv-doc %description -n guile22-%{srcname} %_description %if %{with guile30} %package -n guile30-%{srcname} Summary: Delimiter-separated values (DSV) format parser for Guile BuildRequires: guile30-devel guile30-lib guile30-smc Requires: guile30 guile30-lib guile30-smc guile-dsv-data Recommends: guile-dsv-doc %description -n guile30-%{srcname} %_description %endif %package data Summary: Data files for guile-dsv %description data %_description %package doc Summary: Documentation for guile-dsv BuildRequires: texinfo %description doc %_description %prep %setup -qc mv %{name}-%{version} guile22 %if %{with guile30} cp -a guile22 guile30 %endif %build pushd guile22 autoreconf -vif GUILE=/usr/bin/guile2.2 export GUILE GUILD=/usr/bin/guild2.2 export GUILD GUILE_EFFECTIVE_VERSION=2.2 export GUILE_EFFECTIVE_VERSION %configure %make_build popd %if %{with guile30} pushd guile30 autoreconf -vif GUILE=/usr/bin/guile3.0 export GUILE GUILD=/usr/bin/guild3.0 export GUILD 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 {} ';' rm %{buildroot}/%{_infodir}/dir %files -n guile22-%{srcname} %license guile22/COPYING %doc guile22/AUTHORS guile22/NEWS guile22/README %if %{with guile30} %else %{_bindir}/dsv %endif %{_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 %{_bindir}/dsv %{_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 %files data %{_datadir}/guile-dsv %files doc %{_infodir}/guile-dsv.info.gz %{_mandir}/man1/dsv.1*