cae5937
%global pkgname alnuth
cae5937
977232c
# When bootstrapping a new architecture, there is no gap-pkg-radiroot package
977232c
# yet.  It is only needed by this package to run some tests, but it requires
977232c
# this package to funtion at all.  Therefore, do this:
977232c
# 1. Build this package in bootstrap mode
977232c
# 2. Build gap-pkg-radiroot
977232c
# 3. Build this package in non-bootstrap mode
ef1456c
%bcond bootstrap 0
cae5937
cae5937
Name:           gap-pkg-%{pkgname}
6c25c80
Version:        3.2.1
5a3075f
Release:        %autorelease
cae5937
Summary:        Algebraic number theory for GAP
cae5937
cd48230
License:        GPL-2.0-or-later
bef0469
BuildArch:      noarch
ef1456c
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ef1456c
ExcludeArch:    %{ix86}
526398b
URL:            https://gap-packages.github.io/alnuth/
ef1456c
VCS:            https://github.com/gap-packages/alnuth
ef1456c
Source0:        %{vcs}/releases/download/v%{version}/%{pkgname}-%{version}.tar.gz
2546c7b
cae5937
BuildRequires:  gap-devel
cae5937
BuildRequires:  gap-pkg-polycyclic
977232c
%if %{without bootstrap}
cae5937
BuildRequires:  gap-pkg-radiroot
cae5937
%endif
cae5937
BuildRequires:  pari-gp
1f565c3
BuildRequires:  tth
cae5937
cae5937
Requires:       gap-pkg-polycyclic
cae5937
Requires:       pari-gp
cae5937
cae5937
%description
cae5937
Alnuth is an extension for the computer algebra system GAP and forms
cae5937
part of a standard installation.  The functionality of Alnuth lies in
cae5937
ALgebraic NUmber THeory.  It provides an interface from GAP to certain
cae5937
number theoretic functions from the computer algebra system PARI/GP.
cae5937
Most computations with Alnuth rely on this interface.
cae5937
977232c
%package doc
1201df8
# The content is GPL-2.0-or-later.  The remaining licenses cover the various
1201df8
# fonts embedded in PDFs.
1201df8
# AMS: OFL-1.1-RFN
57dc4ba
# CM: Knuth-CTAN
1201df8
# Nimbus: AGPL-3.0-only
57dc4ba
License:        GPL-2.0-or-later AND OFL-1.1-RFN AND Knuth-CTAN AND AGPL-3.0-only
977232c
Summary:        Alnuth documentation
977232c
Requires:       %{name} = %{version}-%{release}
977232c
Requires:       gap-online-help
977232c
977232c
%description doc
977232c
This package contains documentation for gap-pkg-%{pkgname}.
977232c
cae5937
%prep
bef0469
%autosetup -n %{pkgname}-%{version}
cae5937
cae5937
%build
bef0469
export LC_ALL=C.UTF-8
bef0469
1f565c3
# Link to main GAP documentation
57dc4ba
ln -s %{gap_libdir}/etc ../../etc
57dc4ba
ln -s %{gap_libdir}/doc ../../doc
1f565c3
pushd doc
1f565c3
./make_doc
1f565c3
popd
1f565c3
rm -f ../../{doc,etc}
cae5937
cae5937
%install
57dc4ba
mkdir -p %{buildroot}%{gap_libdir}/pkg/%{pkgname}/doc
57dc4ba
cp -a *.g exam gap gp htm tst %{buildroot}%{gap_libdir}/pkg/%{pkgname}
bef0469
%gap_copy_docs
cae5937
977232c
%if %{without bootstrap}
cae5937
%check
cae5937
# Tests that depend on RadiRoot will fail during a bootstrap build.
bef0469
export LC_ALL=C.UTF-8
57dc4ba
gap -l "%{buildroot}%{gap_libdir};" tst/testall.g
1f565c3
%endif
cae5937
cae5937
%files
3d400bc
%doc CHANGES.md README.md
cae5937
%license GPL
57dc4ba
%{gap_libdir}/pkg/%{pkgname}/
57dc4ba
%exclude %{gap_libdir}/pkg/%{pkgname}/doc/
57dc4ba
%exclude %{gap_libdir}/pkg/%{pkgname}/htm/
977232c
977232c
%files doc
57dc4ba
%docdir %{gap_libdir}/pkg/%{pkgname}/doc/
57dc4ba
%docdir %{gap_libdir}/pkg/%{pkgname}/htm/
57dc4ba
%{gap_libdir}/pkg/%{pkgname}/doc/
57dc4ba
%{gap_libdir}/pkg/%{pkgname}/htm/
cae5937
cae5937
%changelog
5a3075f
%autochangelog