Blob Blame History Raw
%global upstreamver 1r2p5
%global pkgname tomlib

Name:           gap-pkg-%{pkgname}
Version:        %(sed -r "s/r|p/./g" <<< %{upstreamver})
Release:        5%{?dist}
Summary:        GAP Table of Marks package

License:        GPLv2+
URL:            http://schmidt.nuigalway.ie/%{pkgname}/
Source0:        http://schmidt.nuigalway.ie/%{pkgname}/%{pkgname}%{upstreamver}.tar.gz
# Fix documentation reference bugs
Patch0:         %{name}-doc.patch
BuildArch:      noarch

BuildRequires:  gap-devel
BuildRequires:  gap-pkg-atlasrep
BuildRequires:  parallel
BuildRequires:  procps

Requires:       gap-pkg-atlasrep

Recommends:     gap-pkg-ctbllib

# This can be removed once Fedora 21 reaches EOL
Obsoletes:      gap-table-of-marks < 1.2.5-1%{?dist}
Provides:       gap-table-of-marks = %{version}-%{release}

%description
This package provides access to several hundred tables of marks of
almost simple groups and their maximal subgroups.

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

# Remove spurious executable bits
chmod a-x doc/tomlib.xml

%build
# Compress large tables of marks
parallel %{?_smp_mflags} --no-notice gzip --best ::: data/*.tom

# Build the documentation
make -C doc GAP=%{_bindir}/gap

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

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

%files
%doc README
%docdir %{_gap_dir}/pkg/%{pkgname}/doc
%{_gap_dir}/pkg/%{pkgname}/

%changelog
* Wed Nov 11 2015 Jerry James <loganjerry@gmail.com> - 1.2.5-5
- Drop scriptlets; gap-core now uses rpm file triggers
- Rebuild documentation from source
- Turn test failures into build failures

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Jan 29 2015 Jerry James <loganjerry@gmail.com> - 1.2.5-3
- Compress with _smp_mflags

* Thu Jan 29 2015 Jerry James <loganjerry@gmail.com> - 1.2.5-2
- Compress the tables in parallel

* Fri Jan 16 2015 Jerry James <loganjerry@gmail.com> - 1.2.5-1
- Initial RPM