Blob Blame History Raw
# Automated testing is difficult, since we really want to visually inspect
# the results of the tests.  I have not been able to find a useful automated
# test for this package, so the maintainer should always run this before
# pushing a new version:
# gap -l "%%{_gapdir};%%{buildroot}%%{_gapdir}" <<< 'Test("tst/test.tst");'
# That test is more useful if the altasrep package is also installed.

%global pkgname Browse

# For bootstrapping purposes, turn this off.  It is only needed to build the
# documentation.  The package functions without ctbllib.
%bcond_without ctbllib

Name:           gap-pkg-browse
Version:        1.8.8
Release:        2%{?dist}
Summary:        GAP browser for 2-dimensional arrays of data

License:        GPLv3+

BuildRequires:  gap-devel
BuildRequires:  GAPDoc-latex
BuildRequires:  gap-pkg-atlasrep
%if %{with ctbllib}
BuildRequires:  gap-pkg-ctbllib
BuildRequires:  gap-pkg-io
BuildRequires:  gcc
BuildRequires:  ghostscript
BuildRequires:  ncurses-devel
BuildRequires:  netpbm-progs

Requires:       gap-core

Recommends:     gap-pkg-atlasrep
Recommends:     gap-pkg-io

# Don't Provide the ncurses glue
%global __provides_exclude_from ncurses\\.so

The motivation for this package was to develop functions for an
interactive display of two-dimensional arrays of data, for example
character tables.  They should be displayed with labeled rows and
columns, the display should allow some markup for fonts or colors, it
should be possible to search for entries, to sort rows or columns, to
hide and unhide information, to bind commands to keys, and so on.

To achieve this our package now provides three levels of functionality,
where in particular the first level may also be used for completely
other types of applications:
- A low level interface to ncurses: This may be interesting for all
  kinds of applications which want to display text with some markup and
  colors, maybe in several windows, using the available capabilities of
  a terminal.
- A medium level interface to a generic function NCurses.BrowseGeneric:
  We introduce a new operation Browse which is meant as an interactive
  version of Display for GAP objects.  Then we provide a generic
  function for browsing two-dimensional arrays of data, handles labels
  for rows and columns, searching, sorting, binding keys to actions,
  etc.  This is for users who want to implement new methods for browsing
  two-dimensional data.
- Applications of these interfaces: We provide some applications of the
  ncurses interface and of the function NCurses.BrowseGeneric.  These
  may be interesting for end users, and also as examples for programmers
  of further applications.  This includes a method for browsing
  character tables, several games, and an interface for demos.

%setup -q -n %{pkgname}

# Give an executable script a shebang
sed -i '1i#!/bin/sh' bibl/getnewestbibfile

# This is NOT an autoconf-generated configure script
./configure %{_gap_dir}
make %{?_smp_mflags} LDFLAGS="$RPM_LD_FLAGS" GAPPATH="%{_gap_dir}"

# Fix permissions on the shared object
chmod 0755 bin/*/

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

mkdir -p %{buildroot}%{_gap_dir}/pkg
cp -a ../%{pkgname} %{buildroot}%{_gap_dir}/pkg

# Remove files that don't need to be installed
rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/{doc/clean,CHANGES,README,configure,Makefile*}
rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/doc/*.{aux,bbl,blg,brf,idx,ilg,ind,log,out,pnr,tex,toc}
rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/tst/*~
rm -fr %{buildroot}%{_gap_dir}/pkg/%{pkgname}/src

%docdir %{_gap_dir}/pkg/%{pkgname}/doc
%license doc/GPL

* Fri Jul 13 2018 Fedora Release Engineering <> - 1.8.8-2
- Rebuilt for

* Sat Jun  9 2018 Jerry James <> - 1.8.8-1
- New upstream version

* Wed Feb 07 2018 Fedora Release Engineering <> - 1.8.7-4
- Rebuilt for

* Wed Aug 02 2017 Fedora Release Engineering <> - 1.8.7-3
- Rebuilt for

* Wed Jul 26 2017 Fedora Release Engineering <> - 1.8.7-2
- Rebuilt for

* Sat Jul 22 2017 Jerry James <> - 1.8.7-1
- New upstream version

* Fri Feb 10 2017 Fedora Release Engineering <> - 1.8.6-7
- Rebuilt for

* Thu Apr  7 2016 Jerry James <> - 1.8.6-6
- Rebuild for gap 4.8.3

* Wed Feb 03 2016 Fedora Release Engineering <> - 1.8.6-5
- Rebuilt for

* Wed Nov 11 2015 Jerry James <> - 1.8.6-4
- Drop scriptlets; gap-core now uses rpm file triggers
- Rebuild documentation from source

* Wed Jun 17 2015 Fedora Release Engineering <> - 1.8.6-3
- Rebuilt for

* Fri Jan 23 2015 Jerry James <> - 1.8.6-2
- Add Requires(post) and Requires(postun)
- Mark documentation as such
- Add linker flags

* Fri Jan 16 2015 Jerry James <> - 1.8.6-1
- Initial RPM