[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Request for discussion: gap (computer algebra system)

I have to package several things locally and I figured that it would
be nice to at least get the packages to Extras-quality.  Here is the
GAP computer algebra system.  The package was originally made by Rex
Dieter but I've been hacking on it here a bit.  I'm not proposing it
for submission unless others are interested and I can get assent from

Building GAP is mildly complicated.  It consists of a base system plus
various included packages or modules, each of which needs separate
treatment.  Each module has its own configure script, but many of
these are not related to autoconf.  This causes complaints from
rpmlint about not specifying libdir, which must be ignored.

The package also includes a desktop file and icon; I have probably
screwed something up there but it seems to work.

Outside of no-signature and bogus configure-without-libdir-spec
complaints, rpmlint is quiet.  The spec is below; packages are at

 - J<

%define	major	4
%define minor 	4	
%define patchlevel	5

# This package has way too many version strings
%define bver	%{major}%{minor}
%define sver    %{major}r%{minor}
%define lver	%{major}r%{minor}p%{patchlevel}
%define	ver	%{major}.%{minor}.%{patchlevel}
%define rel	0.1%{?dist}
%define pkgver  2005_05_30-14_47_UTC
%define gapdir  %{_libdir}/%{name}-%{ver}
%define gapdoc  %{_docdir}/%{name}-%{ver}
%define docpkg	1

Name:		gap
Summary: 	Groups, Algorithms and Programming
Group:		Applications/Engineering
Version: 	%{ver}	
Release: 	%{rel}
URL:		http://turnbull.mcs.st-and.ac.uk/~gap/
Source0: 	ftp://ftp.gap-system.org/pub/gap/gap%{bver}/tar.bz2/gap%{lver}.tar.bz2
Source1:	ftp://ftp-gap.dcs.st-and.ac.uk/pub/gap/gap%{bver}/tar.bz2/packages-%{pkgver}.tar.bz2
Source2:	gap4-32.png
License: 	GPL
BuildRoot: 	%{_tmppath}/%{name}-%{version}-%(id -u -n)-root	
BuildRequires:	autoconf
BuildRequires:	desktop-file-utils glibc-devel gmp-devel 

#Patch1:		%{name}-%{lver}-xgapfix.patch

GAP (Groups, Algorithms and Programming) is a system for computational 
discrete algebra with particular emphasis on, but not restricted to 
computational group theory.

%if "%{docpkg}" == "1"
%package doc
Group: Documentation
Requires: %{name} = %{version}-%{release}
# Requires: htmlview
Summary: %{name} documentation
%description doc
%{name} documentation.
Obsoletes: %{name}-doc < %{version}-%{release}
Provides: %{name}-doc = %{version}-%{release}

%package gac 
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
Summary: %{name} compiler
Requires: gcc
%description gac 
%{name} compiler and friends.

%package xgap
Group:	Applications/Engineering
Requires: %{name} = %{version}-%{release}
Summary: %{name} graphical interface
%description xgap
%{name} graphical interface
%{?!_icondir:%define _icondir	%{_datadir}/pixmaps}


## Easy setup with tar files
%setup -q -n %{name}%{sver}
%setup -q -n %{name}%{sver}/pkg -T -D -a 1 

cd ..

# Main package
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

pushd pkg/xgap
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

# Other packages, taken from InstPackages.sh script
pushd pkg/ace
./configure ../..
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

pushd pkg/anupq
./configure ../..
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

# skip atlasrep datagens, dataword chmods

# skip carat

pushd pkg/cohomolo
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

# skip edim; need to unset LANG, LC_ALL

pushd pkg/example
./configure ../..
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

pushd pkg/fplsa
./configure ../..
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

pushd pkg/grape
./configure ../..
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" linux-gcc

pushd pkg/guava*
./configure ../..
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

pushd pkg/kbmag
#make clean
./configure ../..
#make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" COPTS="-O2 -g"

# Seems to be busted on 64-bit linux
#pushd pkg/nq
#make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"

# Seems to be busted
#pushd pkg/pargap
#./configure ../..
#make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
#cp bin/pargap.sh ../../bin/
#rm -f ALLPKG

# Cleanup unneeded crud
rm -f Makefile* config* pkg/xgap/config* pkg/xgap/bin/*/config*
rm -f pkg/xgap/bin/*/*.o
rm -rf src pkg/xgap/src
rm bin/*.dll bin/*.bat bin/*.pif bin/*.exe

cd ..

install -d $RPM_BUILD_ROOT{%{_bindir},%{gapdoc},%{gapdir}}

# Should probably use install here.
cp -a [a-c,f-z]* \
rm $RPM_BUILD_ROOT%{gapdir}/pkg/PKGDIR

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mkdir -p $RPM_BUILD_ROOT%{_datadir}/application-registry
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime-info
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps

cp -a etc $RPM_BUILD_ROOT%{gapdoc}
cp -a doc/* $RPM_BUILD_ROOT%{gapdoc}
cp -a README $RPM_BUILD_ROOT%{gapdoc}

# fixup gap shell wrapper 
perl -pi -e"s ^GAP_DIR= *@GAP_DIR=%{gapdir}@" \
ln	$RPM_BUILD_ROOT%{gapdir}/bin/%{name}.sh \

# fixup xgap shell wrapper
perl -pi -e"s ^GAP_DIR= *@GAP_DIR=%{gapdir}@" \
ln      $RPM_BUILD_ROOT%{gapdir}/pkg/xgap/bin/x%{name}.sh \

# applnk/icon for xgap
cat > xgap.desktop << EOF
[Desktop Entry]
Exec=xgap --stay
Comment=The GAP computer algebra system (v%{version})
desktop-file-install --vendor Fedora \
	--add-category X-UH \
	--add-category X-Fedora \
	--add-category Application \
	--add-category Math \
	--add-category Algebra \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \

install -D -m644 %SOURCE2 $RPM_BUILD_ROOT%{_icondir}/gap4.png

%defattr(-, root, root)
%doc %{gapdir}/pkg/README.[a-w,y-z]*
%doc %{gapdir}/pkg/README.xmod

%dir %{gapdir}

# Grab everything *except* doc,pkg

# And in pkg, everything except xgap


%if "%{docpkg}" == "1" 
%files doc

%doc %{gapdoc}

%files gac

%files xgap
%doc %{gapdir}/pkg/README.xgap

rm -rf "$RPM_BUILD_ROOT" 

* Fri Jun  3 2005 Jason L Tibbitts III <tibbs math uh edu> - 4.4.5-0.1
- Update to 4.4.5.
- Beginnings of cleanup for Fedora Extras.

* Fri Sep 10 2004 Jason Tibbitts <tibbs math uh edu> 4.4.3-2
- Add transparency to icon.
- Fix warnings from desktop-file-install.

* Fri Jun 11 2004 Jason Tibbitts <tibbs math uh edu> 4.4.3-1
- Update to 4.4.3.

* Fri Nov 15 2002 Rex Dieter <rdieter unl edu> 4.3.3-0
- 4r3, fix3
- merge -doc subpkg into main (for now).

* Mon Jan 14 2002 Rex Dieter <rdieter unl edu> 4.2.8-1
- version: 4r2 -> 4.2
- doc subpkg (only html docs, for now)
- gac subpkg 
- specfile cosmetics
- at least pretend to be relocatable

* Tue Jun 26 2001  Rex Dieter <rdieter unl edu>
- First try, gap4r2 (+fixes 1-8)
- convert zoo archives to tar.gz
- bundle fixes 1-8 into one file.
- TODO: Split into multiple smaller rpms.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]