%global pkgname io Name: gap-pkg-%{pkgname} Version: 4.4.6 Release: 0.2%{?dist} Summary: Unix I/O functionality for GAP License: GPLv3+ URL: http://gap-packages.github.io/io/ Source0: https://github.com/gap-packages/io/releases/download/v%{version}/%{pkgname}-%{version}.tar.bz2 # Enable large file suupport; cannot be sent upstream until our large file # patches for GAP itself have been accepted. Patch0: %{name}-largefile.patch BuildRequires: gap-devel BuildRequires: gap-pkg-autodoc BuildRequires: gcc BuildRequires: pkgconfig Requires: gap-core %description This GAP package provides a link to the standard UNIX I/O functionality that is available through the C library. This part basically consists of functions on the GAP level that allow functions in the C library to be called. Built on top of this is a layer for buffered input/output which is implemented completely in the GAP language. It is intended to be used by programs for which it is not necessary to have full direct access to the operating system. On this level, quite a few convenience functions are implemented for interprocess communication like starting up pipelines of processes to filter data through them and to start up processes and then communicate with them. There is also support for creating network connections over TCP/IP and UDP. Building on this, the package contains an implementation of the client side of the HTTP protocol making it possible among other things to access web pages from within GAP. Another part of the package is a framework for object serialization. That is, GAP objects can be converted into a platform-independent byte sequence which can be stored to a file or sent over the network. The code takes complete care of arbitrarily self-referential data structures like lists containing themselves as an entry. The resulting byte strings can be read back into GAP and the original objects are rebuilt with exactly the same self-references. This works for most of the standard builtin types of GAP like numbers, permutations, polynomials, lists, and records and can be extended to nearly arbitrary GAP objects. %prep %setup -q -n %{pkgname}-%{version} %patch0 # Work around a presumption that filenames are case insensitive mv doc/io.xml doc/IO.xml %build export CFLAGS="$RPM_OPT_FLAGS -DUSE_GMP -D_FILE_OFFSET_BITS=64" %configure --with-gaproot=%{_gap_dir} --disable-silent-rules make %{?_smp_mflags} io.la make doc # Remove an unnecessary script and some leftover build artifacts rm -f doc/clean doc/*.{aux,bbl,blg,idx,ilg,ind,log,out,pnr,toc} %install # Get the name of the arch-specific subdirectory source %{_gap_dir}/sysinfo.gap # Install, but not the libtool archive mkdir -p %{buildroot}%{_gap_dir}/pkg/%{pkgname}/bin/$GAParch ./libtool --mode=install %{_bindir}/install -c io.la \ %{buildroot}%{_gap_dir}/pkg/%{pkgname}/bin/$GAParch rm -f %{buildroot}%{_gap_dir}/pkg/%{pkgname}/bin/$GAParch/io.la cp -a *.g doc example gap tst %{buildroot}%{_gap_dir}/pkg/%{pkgname} %check # Cannot run the HTTP test, as there is no network access on koji builders runtest() { gap -l "%{buildroot}%{_gap_dir};%{_gap_dir}" $1 < /dev/null 2>&1 | tee log grep -Fvq 'gap> Error' log rm -f log } cd tst echo Testing platform runtest platform.g echo Testing pickle runtest pickle.g echo Testing buffered runtest buffered.g echo Testing compression runtest compression.g %files %doc CHANGES README TODO %docdir %{_gap_dir}/pkg/%{pkgname}/doc %docdir %{_gap_dir}/pkg/%{pkgname}/example %license GPL LICENSE %{_gap_dir}/pkg/%{pkgname}/ %changelog * Fri Feb 10 2017 Fedora Release Engineering - 4.4.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Apr 7 2016 Jerry James - 4.4.6-1 - New upstream version * Wed Feb 03 2016 Fedora Release Engineering - 4.4.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jan 7 2016 Jerry James - 4.4.5-1 - New upstream version - Update URLs * Wed Nov 11 2015 Jerry James - 4.4.4-3 - 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 - 4.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Jan 16 2015 Jerry James - 4.4.4-1 - Initial RPM