%if 0%{?fedora} >= 35 %bcond_without guile30 %else %bcond_with guile30 %endif %global srcname xapian Name: guile-%{srcname} Version: 0.3.1 Release: 1%{?dist} Summary: Guile bindings for Xapian License: GPLv2 URL: https://git.systemreboot.net/guile-xapian/about/ Source0: https://git.systemreboot.net/guile-xapian/snapshot/guile-xapian-%{version}.tar.gz BuildRequires: /usr/bin/autoreconf /usr/bin/aclocal BuildRequires: libtool # for AX_PKG_SWIG BuildRequires: autoconf-archive BuildRequires: zlib-devel BuildRequires: /usr/bin/swig /usr/bin/g++ BuildRequires: xapian-core-devel %global _description %{expand: guile-xapian provides Guile bindings for Xapian, a search engine library. Xapian is a highly adaptable toolkit which allows developers to easily add advanced indexing and search facilities to their own applications. It has built-in support for several families of weighting models and also supports a rich set of boolean query operators.} %description %_description %package -n guile22-%{srcname} Summary: Guile bindings for Xapian BuildRequires: guile22-devel guile22-lib Requires: guile22 guile22-lib Obsoletes: guile-%{srcname} <= 0.1.0-1 %description -n guile22-%{srcname} %_description %if %{with guile30} %package -n guile30-%{srcname} Summary: Guile bindings for Xapian BuildRequires: guile30-devel guile30-lib Requires: guile30 guile30-lib %description -n guile30-%{srcname} %_description %endif %prep %setup -qc mv %{name}-%{version} guile22 %if %{with guile30} cp -a guile22 guile30 %endif %build pushd guile22 ./bootstrap.sh %configure --disable-static \ 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 ./bootstrap.sh %configure --disable-static \ 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 %doc guile22/README.org %{_libdir}/libguilexapian-2.2.so* %{_libdir}/guile/2.2/site-ccache/xapian %{_datadir}/guile/site/2.2/xapian %if %{with guile30} %files -n guile30-%{srcname} %license guile30/COPYING %doc guile30/README.org %{_libdir}/libguilexapian-3.0.so* %{_libdir}/guile/3.0/site-ccache/xapian %{_datadir}/guile/site/3.0/xapian %endif