Blob Blame Raw
%global pkgname utils

Name:           gap-pkg-%{pkgname}
Version:        0.53
Release:        1%{?dist}
Summary:        Utility functions for GAP

License:        GPLv2+
URL:            https://gap-packages.github.io/utils/
Source0:        https://github.com/gap-packages/utils/releases/download/v%{version}/%{pkgname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  gap-devel
BuildRequires:  GAPDoc-latex
BuildRequires:  gap-pkg-autodoc
BuildRequires:  gap-pkg-polycyclic

Requires:       gap-core
Requires:       gap-pkg-polycyclic

%description
The Utils package provides a collection of utility functions gleaned
from many packages.

%prep
%setup -q -n %{pkgname}-%{version}

%build
# Link to main GAP documentation
ln -s %{_gap_dir}/doc ../../doc
mkdir ../pkg
ln -s ../%{pkgname}-%{version} ../pkg/%{pkgname}
gap -l "$PWD/..;%{_gap_dir}" makedoc.g
rm -fr ../../doc ../pkg

%install
mkdir -p %{buildroot}%{_gap_dir}/pkg
cp -a ../%{pkgname}-%{version} %{buildroot}%{_gap_dir}/pkg/%{pkgname}
rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/{CHANGES,LICENSE.txt,README}
rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/doc/*.{aux,bbl,blg,brf,idx,ilg,ind,log,out,pnr,tex,toc}

%check
gap -l "%{buildroot}%{_gap_dir};%{_gap_dir}" < tst/testall.g 2>&1 | tee log
grep -Fvq fail log
rm -f log

%files
%doc CHANGES.md README.md
%license LICENSE.txt
%docdir %{_gap_dir}/pkg/%{pkgname}/doc
%docdir %{_gap_dir}/pkg/%{pkgname}/htm
%{_gap_dir}/pkg/%{pkgname}/

%changelog
* Sat Mar 10 2018 Jerry James <loganjerry@gmail.com> - 0.53-1
- New upstream version

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.49-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Jan  6 2018 Jerry James <loganjerry@gmail.com> - 0.49-1
- New upstream version

* Wed Nov  8 2017 Jerry James <loganjerry@gmail.com> - 0.48-1
- New upstream version

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.46-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Thu Feb  9 2017 Jerry James <loganjerry@gmail.com> - 0.46-1
- New upstream version, now needs polycyclic

* Wed Jan 18 2017 Jerry James <loganjerry@gmail.com> - 0.44-1
- New upstream version

* Thu Oct 20 2016 Jerry James <loganjerry@gmail.com> - 0.43-1
- New upstream version

* Wed Oct 19 2016 Jerry James <loganjerry@gmail.com> - 0.42-1
- New upstream version

* Tue May  3 2016 Jerry James <loganjerry@gmail.com> - 0.40-1
- Initial RPM