715ebdc
%global pkgname digraphs
715ebdc
715ebdc
Name:           gap-pkg-%{pkgname}
7f9b18d
Version:        1.7.1
f1307bd
Release:        %autorelease
715ebdc
Summary:        GAP package for digraphs and multidigraphs
715ebdc
80805c8
# The project as a whole is GPL-3.0-or-later.
80805c8
# The bundled copy of bliss is LGPL-3.0-only.
80805c8
License:        GPL-3.0-or-later AND LGPL-3.0-only
7f9b18d
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
7f9b18d
ExcludeArch:    %{ix86}
063f439
URL:            https://digraphs.github.io/Digraphs/
7f9b18d
VCS:            https://github.com/digraphs/Digraphs
7f9b18d
Source0:        %{vcs}/releases/download/v%{version}/%{pkgname}-%{version}.tar.gz
715ebdc
715ebdc
BuildRequires:  gap-devel
b4b4c94
BuildRequires:  GAPDoc-doc
715ebdc
BuildRequires:  GAPDoc-latex
f24284f
BuildRequires:  gap-pkg-datastructures
715ebdc
BuildRequires:  gap-pkg-grape
715ebdc
BuildRequires:  gap-pkg-io
9fb223f
BuildRequires:  gap-pkg-nautytracesinterface
715ebdc
BuildRequires:  gap-pkg-orb
715ebdc
BuildRequires:  gcc-c++
b0999e9
BuildRequires:  graphviz
53abd4b
BuildRequires:  libtool
4e1764c
BuildRequires:  make
ae9d5a5
BuildRequires:  planarity-devel
ba3611e
BuildRequires:  xdg-utils
715ebdc
f24284f
Requires:       gap-pkg-datastructures%{?_isa}
b4b4c94
Requires:       gap-pkg-io%{?_isa}
b4b4c94
Requires:       gap-pkg-orb%{?_isa}
715ebdc
b4b4c94
Recommends:     gap-pkg-grape%{?_isa}
b4b4c94
Recommends:     gap-pkg-nautytracesinterface%{?_isa}
b0999e9
Recommends:     graphviz
715ebdc
301c6a0
# The bundled copy of bliss has been modified for better integration with GAP
301c6a0
Provides:       bundled(bliss) = 0.73
301c6a0
715ebdc
%description
715ebdc
The Digraphs package is a GAP package containing methods for graphs,
715ebdc
digraphs, and multidigraphs.
715ebdc
b4b4c94
%package doc
c0562e6
# The content is GPL-3.0-or-later.  The remaining licenses cover the various
c0562e6
# fonts embedded in PDFs.
ec3631e
# CM: Knuth-CTAN
c0562e6
# CM-Super: GPL-1.0-or-later
c0562e6
# Nimbus: AGPL-3.0-only
c0562e6
# StandardSymL: GPL-1.0-or-later
ec3631e
License:        GPL-3.0-or-later AND Knuth-CTAN AND GPL-1.0-or-later AND AGPL-3.0-only
b4b4c94
Summary:        Digraphs documentation
b4b4c94
BuildArch:      noarch
b4b4c94
Requires:       %{name} = %{version}-%{release}
b4b4c94
Requires:       GAPDoc-doc
b4b4c94
b4b4c94
%description doc
b4b4c94
This package contains documentation for gap-pkg-%{pkgname}.
b4b4c94
715ebdc
%prep
b0999e9
%autosetup -n %{pkgname}-%{version} -p1
715ebdc
301c6a0
# Make sure the bundled planarity is not used
dd49e7f
rm -fr extern/edge-addition-planarity-suite-Version_3.0.1.0
715ebdc
715ebdc
%build
fad7648
export LC_ALL=C.UTF-8
c7f91e3
%configure --with-gaproot=%{gap_archdir} --disable-silent-rules \
595398d
  --with-external-planarity
715ebdc
%make_build
715ebdc
715ebdc
# Build the documentation
715ebdc
mkdir ../pkg
715ebdc
ln -s ../%{pkgname}-%{version} ../pkg
595398d
gap -l "$PWD/..;" makedoc.g
715ebdc
rm -fr ../pkg
715ebdc
715ebdc
%install
c7f91e3
mkdir -p %{buildroot}%{gap_archdir}/pkg/%{pkgname}/doc
b0999e9
cp -a bin data gap notebooks tst VERSIONS *.g \
c7f91e3
   %{buildroot}%{gap_archdir}/pkg/%{pkgname}
595398d
%gap_copy_docs
715ebdc
715ebdc
%check
595398d
# The "extreme" tests take a long time, so just run the "standard" tests
fad7648
export LC_ALL=C.UTF-8
595398d
mkdir ../pkg
595398d
ln -s ../%{pkgname}-%{version} ../pkg
595398d
gap -l "$PWD/..;" tst/teststandard.g
595398d
rm -fr ../pkg
715ebdc
715ebdc
%files
715ebdc
%doc CHANGELOG.md README.md
715ebdc
%license GPL LICENSE
c7f91e3
%{gap_archdir}/pkg/%{pkgname}/
c7f91e3
%exclude %{gap_archdir}/pkg/%{pkgname}/doc/
b4b4c94
b4b4c94
%files doc
c7f91e3
%docdir %{gap_archdir}/pkg/%{pkgname}/doc/
c7f91e3
%{gap_archdir}/pkg/%{pkgname}/doc/
715ebdc
715ebdc
%changelog
f1307bd
%autochangelog