Update for gap 4.12.0.

Add conditionally-enabled %%check script.
This commit is contained in:
Jerry James 2022-09-26 20:39:53 -06:00
parent 2da611b6ff
commit 0062f9d156

View File

@ -1,20 +1,28 @@
# When bootstrapping a new architecture, there is no gap-pkg-io package yet, # When bootstrapping a new architecture, there is no gap-pkg-io package yet,
# since it requires this package to build. This package can be built without # since it requires this package to build. This package can be built without
# gap-pkg-io, but needs it for completeness. Use the following procedure: # gap-pkg-io, but needs it for completeness. Use the following procedure:
# 1. Do a bootstrap build of this package. # 1. Do a bootstrap build of this package
# 2. Build gap-pkg-io. # 2. Build gap-pkg-autodoc in bootstrap mode
# 3. Do a normal build of this packages, which includes running the tests. # 3. Build gap-pkg-io
%bcond_with bootstrap # 4. Do a normal build of this packages, which builds the documentation
# 5. Build gap-pkg-autodoc in non-bootstrap mode
%bcond_without bootstrap
# The tests require gap-pkg-browse, which is not available in the bootstrap
# process until well after we build the non-bootstrap GAPDoc. Use this to
# enable the tests later.
%bcond_with test
Name: GAPDoc Name: GAPDoc
Version: 1.6.6 Version: 1.6.6
Release: 2%{?dist} Release: 3%{?dist}
Summary: GAP documentation tool Summary: GAP documentation tool
License: GPL-2.0-or-later License: GPL-2.0-or-later
BuildArch: noarch
ExclusiveArch: %{gap_arches} noarch
URL: https://www.math.rwth-aachen.de/~Frank.Luebeck/%{name}/ URL: https://www.math.rwth-aachen.de/~Frank.Luebeck/%{name}/
Source0: https://www.math.rwth-aachen.de/~Frank.Luebeck/%{name}/%{name}-%{version}.tar.bz2 Source0: https://www.math.rwth-aachen.de/~Frank.Luebeck/%{name}/%{name}-%{version}.tar.bz2
BuildArch: noarch
BuildRequires: gap-devel BuildRequires: gap-devel
BuildRequires: ghostscript BuildRequires: ghostscript
@ -45,6 +53,10 @@ BuildRequires: gap-pkg-io-doc
Requires: gap-pkg-io Requires: gap-pkg-io
%endif %endif
%if %{with test}
BuildRequires: gap-pkg-browse
%endif
Provides: gap-pkg-gapdoc = %{version}-%{release} Provides: gap-pkg-gapdoc = %{version}-%{release}
%description %description
@ -131,43 +143,69 @@ This package contains documentation for GAPDoc.
%autosetup %autosetup
%build %build
export LC_ALL=C.UTF-8
# Link to main GAP documentation # Link to main GAP documentation
ln -s %{_gap_dir}/doc ../../doc ln -s %{gap_dir}/doc ../../doc
mkdir ../pkg mkdir ../pkg
ln -s ../GAPDoc-%{version} ../pkg ln -s ../GAPDoc-%{version} ../pkg
gap -l "$PWD/..;%{_gap_dir}" < makedocrel.g gap -l "$PWD/..;" makedocrel.g
rm -fr ../../doc ../pkg rm -fr ../../doc ../pkg
# Remove build paths # Remove build paths
sed -i "s|$PWD/..|%{_gap_dir}|g" doc/*.html example/*.html sed -i "s|$PWD/..|%{gap_dir}|g" doc/*.html example/*.html
%install %install
mkdir -p %{buildroot}%{_gap_dir}/pkg mkdir -p %{buildroot}%{gap_dir}/pkg/GAPDoc/{3k+1,doc,example}
cp -a ../%{name}-%{version} %{buildroot}%{_gap_dir}/pkg/%{name} cp -a *.{dtd,g} lib styles tst version %{buildroot}%{gap_dir}/pkg/GAPDoc
rm -f %{buildroot}%{_gap_dir}/pkg/%{name}/{3k+1,doc,example}/clean %gap_copy_docs -n GAPDoc
rm -f %{buildroot}%{_gap_dir}/pkg/%{name}/{3k+1,doc,example}/*.{aux,bbl,blg,brf,idx,ilg,ind,log,out,pnr,tex} %gap_copy_docs -n GAPDoc -d 3k+1
rm -f %{buildroot}%{_gap_dir}/pkg/%{name}/{CHANGES,GPL,README.md} %gap_copy_docs -n GAPDoc -d example
# Link, rather than copy, the style files
for fil in %{gapdoc_files}; do
for dir in 3k+1 doc example; do
path=%{buildroot}%{gap_dir}/pkg/GAPDoc/$dir/$fil
rm -f $path
ln -s ../styles/$fil $path
done
done
%if %{with test}
%check
export LC_ALL=C.UTF-8
mkdir ../pkg
ln -s ../%{name}-%{version} ../pkg
gap -l "$PWD/..;" << EOF
LoadPackage( "Browse" );
GAP_EXIT_CODE( Test( "tst/test.tst" ) );
EOF
rm -fr ../pkg
%endif
%files %files
%doc CHANGES README.md %doc CHANGES README.md
%license GPL %license GPL
%{_gap_dir}/pkg/%{name}/ %{gap_dir}/pkg/%{name}/
%exclude %{_gap_dir}/pkg/%{name}/3k+1/ %exclude %{gap_dir}/pkg/%{name}/3k+1/
%exclude %{_gap_dir}/pkg/%{name}/doc/ %exclude %{gap_dir}/pkg/%{name}/doc/
%exclude %{_gap_dir}/pkg/%{name}/example/ %exclude %{gap_dir}/pkg/%{name}/example/
%files latex %files latex
# This is a metapackage to pull in dependencies only # This is a metapackage to pull in dependencies only
%files doc %files doc
%docdir %{_gap_dir}/pkg/%{name}/3k+1/ %docdir %{gap_dir}/pkg/%{name}/3k+1/
%docdir %{_gap_dir}/pkg/%{name}/doc/ %docdir %{gap_dir}/pkg/%{name}/doc/
%docdir %{_gap_dir}/pkg/%{name}/example/ %docdir %{gap_dir}/pkg/%{name}/example/
%{_gap_dir}/pkg/%{name}/3k+1/ %{gap_dir}/pkg/%{name}/3k+1/
%{_gap_dir}/pkg/%{name}/doc/ %{gap_dir}/pkg/%{name}/doc/
%{_gap_dir}/pkg/%{name}/example/ %{gap_dir}/pkg/%{name}/example/
%changelog %changelog
* Mon Sep 26 2022 Jerry James <loganjerry@gmail.com> - 1.6.6-3
- Update for gap 4.12.0
- Add conditionally-enabled %%check script
* Tue Aug 16 2022 Jerry James <loganjerry@gmail.com> - 1.6.6-2 * Tue Aug 16 2022 Jerry James <loganjerry@gmail.com> - 1.6.6-2
- Convert License tag to SPDX - Convert License tag to SPDX
- Drop license tags for no longer bundled mathml files - Drop license tags for no longer bundled mathml files