SHA256
1
0
forked from pool/gap
gap/gap.spec

476 lines
14 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gap
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: gap
Version: 4.6.4
Release: 0
Summary: System for Computational Discrete Algebra
License: GPL-2.0+
Group: Productivity/Scientific/Math
Url: http://gap-system.org/
#DL-URL: ftp://ftp.gap-system.org/pub/gap/gap4/tar.gz/gap4r6p4_2013_05_04-16_36.tar.gz
Source: gap-4.6.4.tar.xz
Source2: %name-rpmlintrc
Source3: sanitize_source.sh
Patch1: gap-final-dir.diff
Patch2: gap-multiarch.diff
Patch5: gap-ttyname-null.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildRequires: gmp-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: readline-devel
BuildRequires: xz
%if 0%{?suse_version}
BuildRequires: fastjar
%endif
Requires: gap-core
Requires: gap-devel
Requires: gap-doc
%define gap_sitelib_anchor %_datadir/%name
%define gap_sitearch_anchor %_libexecdir/%name
%define gapdir %gap_sitearch_anchor
%define gapdatadir %gap_sitelib_anchor
%description
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory. GAP provides a programming
language, a library of thousands of functions implementing algebraic
algorithms written in the GAP language as well as large data
libraries of algebraic objects. GAP is used in research and teaching
for studying groups and their representations, rings, vector spaces,
algebras, combinatorial structures, and more.
This package is for a medium GAP installation: core, documentation
and development. See gap-full if you want everything of the GAP
distribution.
%package core
Summary: Runtime for GAP (System for Computational Discrete Algebra)
Group: Productivity/Scientific/Math
Obsoletes: gap-base < %version-%release
Provides: gap-base = %version-%release
Requires: gap-data = %version
Requires: gap-gapdoc >= 1.5.1
%description core
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory. GAP provides a programming
language, a library of thousands of functions implementing algebraic
algorithms written in the GAP language as well as large data
libraries of algebraic objects. GAP is used in research and teaching
for studying groups and their representations, rings, vector spaces,
algebras, combinatorial structures, and more.
This package only pulls in the GAP core.
%package data
Summary: Data files for GAP (System for Computational Discrete Algebra)
Group: Productivity/Scientific/Math
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
Obsoletes: gap45-data
Obsoletes: gap46-data < %version-%release
Provides: gap46-data = %version-%release
%description data
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This subpackage contains arch-independent supplementary data for GAP.
%package devel
Summary: Development environment for GAP
Group: Development/Tools/Other
Requires: gap-base = %version
Obsoletes: gap45-devel
Obsoletes: gap46-devel < %version-%release
Provides: gap46-devel = %version-%release
%description devel
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This package will pull in the current version of the GAP compiler and
utilities required to build GAP packages that need compilation.
%package doc
Summary: Documentation for GAP
Group: Documentation/Other
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This subpackage contains the documentation to GAP.
%package full
Summary: Metapackage to cause installation of the GAP Distribution
Group: Productivity/Scientific/Math
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
Requires: gap >= %version
Requires: gap-ace >= 5.1
Requires: gap-aclib >= 1.2
Requires: gap-alnuth >= 3.0.0
Requires: gap-anupq >= 3.0
Requires: gap-atlasrep >= 1.5.0
Requires: gap-autodoc >= 2013.01.16
Requires: gap-automata >= 1.13
Requires: gap-automgrp >= 1.1.4.1
Requires: gap-autpgrp >= 1.5
Requires: gap-browse >= 1.8.2
Requires: gap-carat >= 2.1.4
Requires: gap-circle >= 1.5.2
Requires: gap-citrus >= 0.9999
Requires: gap-cohomolo >= 1.6
Requires: gap-congruence >= 1.3
Requires: gap-convex >= 2012.11.15
Requires: gap-crime >= 1.4
Requires: gap-crisp >= 1.3.6
Requires: gap-cryst >= 4.1.11
Requires: gap-crystcat >= 1.1.6
Requires: gap-ctbllib >= 1.2.2
Requires: gap-cubefree >= 1.13
Requires: gap-cvec >= 2.4
Requires: gap-design >= 1.6
Requires: gap-edim >= 1.3.1
Requires: gap-example >= 3.4.3
Requires: gap-examplesforhomalg >= 2012.10.23
Requires: gap-factint >= 1.5.3
Requires: gap-fga >= 1.2.0
Requires: gap-float >= 0.5.9
Requires: gap-format >= 1.3
Requires: gap-forms >= 1.2.2
Requires: gap-fplsa >= 1.1
Requires: gap-fr >= 2.0.3
Requires: gap-fwtree >= 1.0
Requires: gap-gapdoc >= 1.5.1
Requires: gap-gauss >= 2013.03.07
Requires: gap-gaussforhomalg >= 2012.10.22
Requires: gap-gbnp >= 1.0.1
Requires: gap-genss >= 1.5
Requires: gap-gpd >= 1.19
Requires: gap-gradedmodules >= 2013.02.07
Requires: gap-gradedringforhomalg >= 2013.02.07
Requires: gap-grape >= 4.6.1
Requires: gap-grpconst >= 2.3
Requires: gap-guarana >= 0.94
Requires: gap-guava >= 3.12
Requires: gap-hap >= 1.10.10.2
Requires: gap-hapcryst >= 0.1.10
Requires: gap-happrime >= 0.6
Requires: gap-hecke >= 1.3
Requires: gap-homalg >= 2012.10.28
Requires: gap-homalgtocas >= 2013.02.22
Requires: gap-idrel >= 2.14
Requires: gap-io >= 4.2
Requires: gap-io_forhomalg >= 2012.10.22
Requires: gap-irredsol >= 1.2.1
Requires: gap-itc >= 1.4
Requires: gap-kan >= 1.06
Requires: gap-kbmag >= 1.5
Requires: gap-laguna >= 3.6.3
Requires: gap-liealgdb >= 2.1
Requires: gap-linboxing >= 0.5.2
Requires: gap-localizeringforhomalg >= 2012.10.26
Requires: gap-loops >= 2.2.0
Requires: gap-mapclass >= 1.2
Requires: gap-matricesforhomalg >= 2013.04.16
Requires: gap-modules >= 2013.04.19
Requires: gap-nilmat >= 1.2
Requires: gap-nq >= 2.4
Requires: gap-numericalsgps >= 0.971
Requires: gap-openmath >= 11.1.4
Requires: gap-orb >= 4.6
#Needs separate gap-core built with openmpi and update-alternatives
#Requires: gap-pargap >= 1.3.5
Requires: gap-polenta >= 1.3.1
Requires: gap-polycyclic >= 2.11
Requires: gap-polymakeinterface >= 2013.03.26
Requires: gap-polymaking >= 0.7.8
Requires: gap-qaos
Requires: gap-quagroup >= 1.6
Requires: gap-radiroot >= 2.6
Requires: gap-rcwa >= 3.5.1
Requires: gap-rds >= 1.6
Requires: gap-recog >= 1.2
Requires: gap-recogbase >= 1.2
Requires: gap-repsn >= 3.0.2
Requires: gap-resclasses >= 3.3.0
Requires: gap-ringsforhomalg >= 2013.04.19
Requires: gap-sco >= 2011.08.11
Requires: gap-scscp >= 2.1.2
Requires: gap-sgpviz >= 0.998
Requires: gap-simpcomp >= 1.6.1
Requires: gap-singular >= 12.04.28
Requires: gap-smallsemi >= 0.6.6
Requires: gap-sonata >= 2.6
Requires: gap-sophus >= 1.23
Requires: gap-spinsym >= 1.5
Requires: gap-symbcompcc >= 1.2
Requires: gap-tomlib >= 1.2.2
Requires: gap-toolsforhomalg >= 2013.04.16
Requires: gap-toric >= 1.8
Requires: gap-unipot >= 2012.12.22
Requires: gap-unitlib >= 3.1.3
Requires: gap-wedderga >= 4.5.4
Requires: gap-xgap >= 4.23
Requires: gap-xmod >= 2.22
%description full
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This subpackage will pull in all contributed packages of the GAP
distribution.
%package prim-groups
Summary: GAP: Database of primitive groups
Group: Productivity/Scientific/Math
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description prim-groups
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This subpackage contains the database of primitive groups.
%package rpm-devel
Summary: RPM macros for building GAP packages
Group: Development/Tools/Other
# Not noarch: contains arch-specific paths in RPM macros
%description rpm-devel
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This subpackage provides RPM macros for use with packaging simple GAP
modules that do not require the presence of GAP itself.
%package small-groups
Summary: GAP: Database of small groups
Group: Productivity/Scientific/Math
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description small-groups
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This subpackage contains the database of small groups.
%package trans-groups
Summary: GAP: Database of transitive groups
Group: Productivity/Scientific/Math
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description trans-groups
GAP is a system for computational discrete algebra, with particular
emphasis on Computational Group Theory.
This subpackage contains the database of transitive groups.
%prep
%setup -qn gap4r6
%patch -P 1 -P 2 -P 5 -p1
%build
pushd cnf/
make
popd
#
# Having $GAParch (for example with <gapdir>/bin/$GAParch) is practically useless,
# because <gapdir>/sysinfo.gap is already arch-specific and needs to reside in an
# arch-specific directory.
#
%configure --with-gmp=system --target="%_host" --with-gapdir="%gapdir" \
COPTS="%optflags"
#
# See what fancy tuple they brought us and rerun configure so we can tell it
# the _real_ path of gapbindir. (Using $PWD/`pwd` in configure is absolutely
# hostile to distros.)
#
cat sysinfo.gap;
. ./sysinfo.gap;
%configure --with-gmp=system --target="%_host" --with-gapdir="%gapdir" \
--with-gapbindir="%gapdir/bin/$GAParch" COPTS="%optflags"
# And now, another configure run.
make config;
# Actual compile
make %{?_smp_mflags} compile
# Someone screwed up permissions bigtime.
# Resolve rpmlint: W: spurious-executable-perm
# Resolve rpmlint: W: script-without-shebang
find . -type f "(" \
-name "*.c" -o -name "*.fp" -o -name "*.g" -o -name "*.gd" -o \
-name "*.gi" -o -name "*.grp" -o -name "*.ind" -o -name "*.tex" -o \
-name "*.tst" -o -name "*.xml" \
")" -exec chmod a-x "{}" "+";
%install
b="%buildroot";
# Move doc into FHS
mkdir -p "$b/%_docdir";
mv doc "$b/%_docdir/%name";
ln -s "%_docdir/%name" "doc";
# Move data into FHS
rm -f tst/remake.sh doc/test/re;
mkdir -p "$b/%gapdatadir/pkg";
dirs="grp lib prim small trans tst";
mv $dirs "$b/%gapdatadir";
for i in $dirs; do
ln -s "%gapdatadir/$i" "$i";
done;
# Populate FHS bindir
. ./sysinfo.gap
mkdir -p "$b/%_bindir"
cp -aH bin/gap.sh "$b/%_bindir/gap-%version"
rm -f bin/gap*.sh
ln -s "%gapdir/bin/$GAParch/gac" "$b/%_bindir/gac-%version"
ln -s "gap-%version" "$b/%_bindir/gap"
ln -s "gac-%version" "$b/%_bindir/gac"
# Move compiled things into place (lack of a `make install` target).
# Throw out autogenerated objects, but keep source (3rd-party pkgs make use of it).
mkdir -p "$b/%gapdir";
cp -a . "$b/%gapdir";
rm -Rf "$b/%gapdir"/{autom4*,cnf,configu*};
# RPM extras
mkdir -p "$b/%_sysconfdir/rpm"
cp "%_sourcedir/macros.gap" "$b/%_sysconfdir/rpm/"
cat >>"$b/%_sysconfdir/rpm/macros.gap" <<-EOF
# Anchor directory for %%files list
%%gap_sitelib_anchor %gap_sitelib_anchor
%%gap_sitearch_anchor %gap_sitearch_anchor
# The GAP runtime directory (GAPPATH)
%%gapdir %gapdir
# Directory for modules extending the core
%%gap_sitelib %gapdatadir/pkg
%%gap_sitearch %%gapdir/pkg
EOF
%if 0%{?fdupes:1}
%fdupes %buildroot/%_prefix
%endif
%files
%defattr(-,root,root)
# Dummy entry
%dir %gap_sitelib_anchor/
%files core
%defattr(-,root,root)
%_bindir/gap
%_bindir/gap-*
%dir %gapdir/
%dir %gapdir/bin/
%gapdir/bin/cygwin.ver
%gapdir/bin/gapicon*
%gapdir/bin/gaprxvt*
%dir %gapdir/bin/%_host-*/
%gapdir/bin/%_host-*/gap
%gapdir/doc
%gapdir/etc/
%gapdir/gap.ini
%gapdir/gap.shi
%gapdir/grp
%gapdir/lib
%gapdir/pkg/
%gapdir/prim
%gapdir/small
%gapdir/sysinfo*
%gapdir/trans
%gapdir/tst
%files data
%defattr(-,root,root)
%dir %gap_sitelib_anchor/
%gapdatadir/lib/
%gapdatadir/grp/
%gapdatadir/pkg/
%gapdatadir/tst/
%files devel
%defattr(-,root,root)
%_bindir/gac
%_bindir/gac-*
%dir %gapdir/
%gapdir/INSTALL
%gapdir/Makefile*
%dir %gapdir/bin/
%gapdir/bin/%_host-*
%exclude %gapdir/bin/%_host-*/gap
%gapdir/config*
%gapdir/extern/
%gapdir/makepkgs
%gapdir/src/
%files doc
%defattr(-,root,root)
%_docdir/%name/
%files full
%defattr(-,root,root)
# Dummy entry
%dir %gap_sitelib_anchor/
%files prim-groups
%defattr(-,root,root)
%dir %gap_sitelib_anchor/
%gapdatadir/prim/
%files rpm-devel
%defattr(-,root,root)
%config %_sysconfdir/rpm/
%files small-groups
%defattr(-,root,root)
%dir %gap_sitelib_anchor/
%gapdatadir/small/
%files trans-groups
%defattr(-,root,root)
%dir %gap_sitelib_anchor/
%gapdatadir/trans/
%changelog