File gambit.spec of Package gambit

#
# spec file for package gambit
#
# Copyright (c) 2022 SUSE LLC
#
# 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/
#


%{?!make_build:%global make_build %{__make} -O %{?_smp_mflags}}
Name:           gambit
Version:        4.9.5
Release:        0
Summary:        An efficient implementation of the Scheme programming language
License:        LGPL-2.1-only AND Apache-2.0
Group:          Development/Languages/Scheme
URL:            https://gambitscheme.org/
Source0:        https://github.com/gambit/gambit/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.gz
Source1:        %{name}.rpmlintrc
BuildRequires:  fdupes
BuildRequires:  makeinfo
BuildRequires:  pkgconfig
BuildRequires:  texi2html
BuildRequires:  texinfo
BuildRequires:  pkgconfig(libssl)
BuildRequires:  tex(8r.enc)
BuildRequires:  tex(pcrr.tfm)
Requires:       openssl
Requires(post): %{install_info_prereq}
Requires(pre):  %{install_info_prereq}

%description
The Gambit Scheme system is a complete, portable, efficient and reliable
implementation of the Scheme programming language.

%package doc
Summary:        Documentation for %{name}
Group:          Documentation/HTML
BuildArch:      noarch

%description doc
This package contains the documentation for %{name}.

%prep
%autosetup
%configure \
	--enable-march=%{_arch} \
	--enable-single-host \
	--enable-dynamic-clib \
	--enable-shared \
	--disable-absolute-shared-libs \
	--enable-openssl \
	--libdir=%{_libdir}/%{name} \
	--docdir=%{_defaultdocdir}/%{name} \
	--with-x \
	%{nil}
sed -i -e '4i @documentencoding UTF-8' doc/gambit.txi

%build
%make_build

%install
%make_install
ln -s gsi.1 %{buildroot}%{_mandir}/man1/gsc.1
ln -s %{_libdir}/%{name}/lib%{name}{,gsi,gsc}.so %{buildroot}%{_libdir}
%fdupes %{buildroot}%{_libdir}/%{name}
%fdupes %{buildroot}%{_bindir}

install -dm0755 %{buildroot}%{_defaultdocdir}/%{name}
install -pm0644 README* %{buildroot}%{_defaultdocdir}/%{name}

%check
export GAMBOPT=~~lib=%{buildroot}%{_libdir}/%{name}/
%make_build check

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{?ext_info}

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{?ext_info}

%files
%license LGPL.txt LICENSE-2.0.txt
%{_bindir}/*
%{_mandir}/man1/*.1%{?ext_man}
%{_infodir}/*%{?ext_info}
%{_datadir}/emacs/site-lisp/*
%{_libdir}/%{name}
%{_libdir}/*.so
%{_includedir}/*

%files doc
%license LGPL.txt LICENSE-2.0.txt
%{_defaultdocdir}/%{name}

%changelog
openSUSE Build Service is sponsored by