Blob Blame Raw
%global pkgname  zeromqinterface
%global upname   ZeroMQInterface

Name:           gap-pkg-%{pkgname}
Version:        0.11
Release:        2%{?dist}
Summary:        ZeroMQ bindings for GAP

License:        GPLv2+
URL:  {upname}/

BuildRequires:  gap-devel
BuildRequires:  gap-pkg-autodoc
BuildRequires:  python3-devel
BuildRequires:  zeromq-devel

Requires:       gap-core%{?_isa}

This package provides both low-level bindings as well as some higher
level interfaces for the ZeroMQ message passing library for GAP and
HPC-GAP, enabling lightweight distributed computation.

%package doc
Summary:        Documentation for ZeroMQ bindings for GAP
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}
Requires:       gap-online-help

%description doc
This package contains documentation for gap-pkg-%{pkgname}.

%autosetup -n %{upname}-%{version}

# Fix python shebang
sed -i.orig 's,%{_bindir}/env python,%{__python3},' zgap
touch -r zgap.orig zgap
rm zgap.orig

%configure --with-gaproot=%{_gap_dir} --disable-silent-rules

# Get rid of undesirable hardcoded rpaths
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
    -i libtool


# Build the documentation
gap makedoc.g

mkdir -p %{buildroot}%{_gap_dir}/pkg/%{upname}-%{version}
cp -a bin doc gap tst *.g %{buildroot}%{_gap_dir}/pkg/%{upname}-%{version}
rm -f %{buildroot}%{_gap_dir}/pkg/%{upname}-%{version}/doc/clean
rm -f %{buildroot}%{_gap_dir}/pkg/%{upname}-%{version}/doc/*.{aux,bbl,blg,idx,ilg,ind,log,out,pnr,tex}

mkdir -p %{buildroot}%{_gap_dir}/bin
cp -p zgap %{buildroot}%{_gap_dir}/bin

gap -l "%{buildroot}%{_gap_dir};%{_gap_dir}" < tst/testall.g

%license LICENSE
%exclude %{_gap_dir}/pkg/%{upname}-%{version}/doc/

%files doc
%docdir %{_gap_dir}/pkg/%{upname}-%{version}/doc/

* Wed Apr 24 2019 Jerry James <> - 0.11-2
- Rebuild for changed bin dir name in gap 4.10.1

* Wed Feb 27 2019 Jerry James <> - 0.11-1
- Initial RPM