%define beta cvs20060327
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 0.9.8
Release: 0.5.%{beta}%{?dist}
License: GPL
Group: Applications/Engineering
URL: http://www.math.uiuc.edu/Macaulay2/
#Source: http://www.math.uiuc.edu/Macaulay2/ftp-site/Macaulay2-%{version}.beta.tar.gz
Source: M2-0.9.8-%{beta}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source1: Macaulay2.png
Source2: Macaulay2.desktop
Patch0: Macaulay2-0.9.8-optflags.patch
Patch1: Macaulay2-0.9.8-htmlview.patch
Patch2: Macaulay2-0.9.8-cout.patch
Patch3: Macaulay2-0.9.8-infodir.patch
Patch4: Macaulay2-0.9.8-gcc4.patch
Patch5: Macaulay2-0.9.8-64bit.patch
BuildRequires: desktop-file-utils
BuildRequires: gc-devel
# See http://bugzilla.redhat.com/bugzilla/188499
BuildRequires: ntl-devel
BuildRequires: factory-devel
BuildRequires: libfac-devel
BuildRequires: lapack
%if "%{?fedora}" > "3"
BuildRequires: lapack-devel
%endif
BuildRequires: gdbm-devel
BuildRequires: readline-devel
BuildRequires: time
BuildRequires: byacc
# /sbin/install-info
BuildRequires: info
# etags
BuildRequires: emacs-common
Source10: etags.sh
# M2-help
Requires: htmlview
BuildRequires: automake
Obsoletes: Macaulay2-docs < %{version}-%{release}
Provides: Macaulay2-docs = %{version}-%{release}
%description
Macaulay 2 is a new software system devoted to supporting research in
algebraic geometry and commutative algebra written by Daniel R. Grayson
and Michael E. Stillman
%package emacs
Summary: %{name} emacs mode
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
## %{_datadir}/emacs/site-lisp
#Requires: emacs-common
## /usr/bin/emacs
Requires: emacs
%description emacs
%{summary}.
%prep
%setup -q -n M2
install -m755 %{SOURCE10} ./etags
%patch0 -p1 -b .optflags
%patch1 -p1 -b .htmlview
%patch2 -p1 -b .cout
%patch3 -p1 -b .infodir
%patch4 -p1 -b .gcc4
%patch5 -p1 -b .64bit
%build
# We need /sbin:. in PATH to find install-info,etags
export PATH=/sbin:`pwd`:$PATH
%configure \
--disable-dumpdata \
--disable-optimize \
--disable-static \
--with-lapacklibs="-llapack"
# Not smp-safe
make
%check || :
# util/screen dies on fc5/buildsystem (could not open pty)
#make -k check ||:
%install
rm -rf $RPM_BUILD_ROOT
make install prefix=$RPM_BUILD_ROOT%{_prefix}
# app img
install -p -m644 -D %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/Macaulay2.png
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--vendor fedora \
--add-category "X-Fedora" \
%{SOURCE2}
## Unpackaged files
%clean
rm -rf $RPM_BUILD_ROOT
%post
touch --no-create %{_datadir}/icons/hicolor ||:
gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||:
%postun
touch --no-create %{_datadir}/icons/hicolor ||:
gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||:
%files
%defattr(-,root,root,-)
%doc Macaulay2/README Macaulay2/CHANGES Macaulay2/COPYING
%{_bindir}/M2
%{_bindir}/M2-help
%{_bindir}/M2-load-libs
%{_datadir}/Macaulay2/
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/*/*
# FIXME
%{_docdir}/Macaulay2
%{_infodir}/*
%{_mandir}/man1/M2.1*
%{_mandir}/man1/M2-help.1*
%files emacs
%defattr(-,root,root,-)
%{_bindir}/M2-emacs
%{_datadir}/emacs/site-lisp/*
%changelog
* Mon Jul 10 2006 Rex Dieter <rexdieter[AT]users.sf.net. 0.9.8-0.5.cvs20060327
- -emacs subpkg lives again
* Fri May 05 2006 Rex Dieter <rexdieter[AT]users.sf.net> 0.9.8-0.4.cvs20060327
- 64bit patch (#188709)
* Wed Apr 12 2006 Rex Dieter <rexdieter[AT]users.sf.net> 0.9.8-0.3.cvs20060327
- omit x86_64, for now (#188709)
* Tue Apr 11 2006 Rex Dieter <rexdieter[AT]users.sf.net> 0.9.8-0.2.cvs20060327
- 0.9.8 (cvs, no tarball yet)
- drop -doc subpkg (in main now)
* Mon Apr 10 2006 Rex Dieter <rexdieter[AT]users.sf.net> 0.9.2-22
- fix icon location (#188384)
* Thu Mar 30 2006 Rex Dieter <rexdieter[AT]users.sf.net> 0.9.2-21
- really disable %%check (fails on fc5+ anyway)
* Fri Jan 20 2006 Rex Dieter <rexdieter[AT]users.sf.net> 0.9.2-20
- .desktop: drop Category=Development
- app icon: follow icon spec
- drop -emacs subpkg (in main now)
* Fri Sep 16 2005 Rex Dieter <rexdieter[AT]users.sf.net> - 0.9.2-19
- disable 'make check' (fc5/buildsystem error), besides, we get a
good consistency check when M2 builds all the doc examples.
* Wed Sep 14 2005 Rex Dieter <rexdieter[AT]users.sf.net> - 0.9.2-18
- rebuild against gc-6.6
* Thu May 26 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.2-17
- rebuild (build system x86_64 repository access failed for 0.9.2-16)
- fix build for GCC 4 (#156223)
* Thu Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.2-15
- rebuilt
* Mon Feb 21 2005 Rex Dieter <rexdieter[AT]users.sf.net> 0:0.9.2-14
- x86_64 issues (%%_libdir -> %%_prefix/lib )
- remove desktop_file macro usage
* Sat Oct 23 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.13
- BR: time (again)
- omit m2_dir/setup (not needed/wanted)
* Mon Oct 18 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.12
- actually *apply* gcc34 patch this time.
* Mon Oct 18 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.11
- gcc34 patch
* Fri Oct 1 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.10
- explicit BR versions for gc-devel, libfac-devel, factory-devel
* Tue Aug 10 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.9
- BR: time
* Thu Jun 03 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.8
- .desktop: remove Terminaloptions to be desktop agnostic
- .desktop: Categories += Education;Math;Development (Devel only
added so it shows *somewhere* in gnome menus)
* Tue Jun 01 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.7
- disable default 'make check' (util/screen fails on fc2)
* Tue Mar 30 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.6
- desktop-file is now on by default
- use separate (not inline) .desktop file
* Mon Jan 05 2004 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.5
- fix BuildRequires: desktop-file-utils to satisfy rpmlint.
- put emacs files in emacs subdir too (to follow supplied docs)
- *really* nuke .cvsignore files
- fix desktop-file-install --add-cateagories usage
* Tue Dec 23 2003 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.4
- -emacs: use %%defattr
- -emacs: fix M2-init.el
* Mon Nov 17 2003 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.3
- update/simplify macros
- desktop_file support.
- emacs subpkg.
- relax Req's on subpkgs to just: Requires: %%name = %%epoch:%%version
- use non-versioned BuildRequires
- remove redundant BuildRequires: gmp-devel
- remove gc patch, no longer needed.
- delete/not-package a bunch of unuseful files.
- use --disable-strip when debug_package is in use.
* Thu Nov 13 2003 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.2
- no longer explictly Requires: emacs
* Wed Nov 05 2003 Rex Dieter <rexdieter at sf.net> 0:0.9.2-0.fdr.1
- missing Epoch: 0
* Fri Sep 12 2003 Rex Dieter <rexdieter at sf.net> 0.9.2-0.fdr.0
- fedora'ize