Sisyphus
: 19 2019 | : 17506 | : 15300861
en ru br
ALT
S:5.42.1-alt2
5.1: 5.22.1-alt0.M51.1
4.1: 5.14.0-alt2
4.0: 5.14.0-alt2
3.0: 5.9.2-alt3
www.altlinux.org/Changes

:: /
: maxima

             Sources      Gear   Bugs and FR  Repocop 

%define DEFAULT_LISP    gcl

%define BUILD_GCL 1
%define BUILD_CLISP 1
%define BUILD_SBCL 1
%define BUILD_CMUCL 0

%define BUILD_GCL_ANSI  1

%define BUILD_EMACS     1
%define BUILD_XMAXIMA   1
%define BUILD_BOOK      0

%define CVS_BUILD 0

Name: maxima
Version: 5.9.2
%define maxima_version 5.9.2
Release: alt3
Summary: Maxima Symbolic Computation Program
Summary (ru_RU.UTF-8): Система аналитических вычислений Maxima
License: GPL
Group: Sciences/Mathematics
Url: http://maxima.sourceforge.net
Packager: Vadim V. Zhytnikov <vvzhy at altlinux.ru>

Source0: maxima-%version.tar.gz
Source1: maxima-new-16.xpm
Source2: maxima-new-32.xpm
Source3: maxima-new-48.xpm
Source4: maxima-xmaxima.menu
Source6: maxima-modes.el
%if %BUILD_BOOK
Source7: breqn-0.94.tar.bz2
%endif

Patch2: maxima-5.9.2-gnuplot-pm3d.patch

%description
Maxima is a full symbolic computation program.  It is full featured
doing symbolic manipulation of polynomials, matrices, rational
functions, integration, Todd-coxeter, graphing, bigfloats.  It has a
symbolic debugger source level debugger for maxima code.  Maxima is
based on the original Macsyma developed at MIT in the 1970's.  It is
quite reliable, and has good garbage collection, and no memory leaks.
It comes with hundreds of self tests.  

%description -l ru_RU.UTF-8
Maxima - полнофункциональная универсальная система аналитических вычислений.  
Она может выполнять вычисления с полиномами, матрицами, рациональными
функциями, дифферинцировать, интегрировать, решать уравнения и многое другое.  
Maxima основывается на системе Macsyma, разработанной в MIT в 70х годах
20 века.  Maxima написана на Common Lisp и включает сотни контрольных тестов.


%package common
Summary: Maxima Symbolic Computation Program. Common files
Summary (ru_RU.UTF-8): Система аналитических вычислений Maxima. Общие файлы
Group: Sciences/Mathematics
Provides: maxima = %version-%release
PreReq: %__install_info
Requires: gnuplot >= 4.0.0 rlwrap maxima-bin = %version-%release
BuildRequires: sed perl tetex texinfo tetex-latex automake_1.7
Obsoletes: maxima maxima-clisp

%description common
This package contains common files needed to run Maxima with
any lisp interpreter, documentation etc.

%description common -l ru_RU.UTF-8
Этот пакет содержит общие файлы, необходимые для работы Maxima
с любым вариантом lisp.

%if %BUILD_CLISP
%package bin-clisp
Summary: Maxima Symbolic Computation Program. Clisp binaries
Summary (ru_RU.UTF-8): Система аналитических вычислений Maxima. Выполнимые файлы Clisp
Group: Sciences/Mathematics
Provides: maxima-bin = %version-%release
Requires: maxima-common = %version-%release
BuildRequires: clisp

%description bin-clisp
Maxima binaries compiled with clisp.

%description bin-clisp -l ru_RU.UTF-8
Выполнимые файлы Maxima, скомпилированные Clisp.
%endif

%if %BUILD_GCL
%package bin-gcl
Summary: Maxima Symbolic Computation Program. GCL binaries
Summary (ru_RU.UTF-8): Система аналитических вычислений Maxima. Выполнимые файлы GCL
Group: Sciences/Mathematics
Provides: maxima-bin = %version-%release
Requires: maxima-common = %version-%release libreadline libncurses terminfo libgpm
BuildRequires: gcl >= 2.6.5

%description bin-gcl
Maxima binaries compiled with GCL (GNU Common Lisp).

%description bin-gcl -l ru_RU.UTF-8
Выполнимые файлы Maxima, скомпилированные GCL.
%endif

%if %BUILD_CMUCL
%package bin-cmucl
Summary: Maxima Symbolic Computation Program. CMUCL binaries
Summary (ru_RU.UTF-8): Система аналитических вычислений Maxima. Выполнимые файлы CMUCL
Group: Sciences/Mathematics
Provides: maxima-bin = %version-%release
Requires: maxima-common = %version-%release
BuildRequires: cmucl

%description bin-cmucl
Maxima binaries compiled with CMUCL (CMU Common Lisp).

%description bin-cmucl -l ru_RU.UTF-8
Выполнимые файлы Maxima, скомпилированные CMUCL (CMU Common Lisp).
%endif

%if %BUILD_SBCL
%package bin-sbcl
Summary: Maxima Symbolic Computation Program. SBCL binaries
Summary (ru_RU.UTF-8): Система аналитических вычислений Maxima. Выполнимые файлы SBCL
Group: Sciences/Mathematics
Provides: maxima-bin = %version-%release
Requires: maxima-common = %version-%release sbcl = 0.9.5
BuildRequires: sbcl = 0.9.5

%description bin-sbcl
Maxima binaries compiled with SBCL (Steel Bank Common Lisp).

%description bin-sbcl -l ru_RU.UTF-8
Выполнимые файлы Maxima, скомпилированные SBCL (Steel Bank Common Lisp).
%endif

%if %BUILD_EMACS
%package -n emacs-maxima
Summary: Emacs Maxima modes
Summary (ru_RU.UTF-8): Emacs моды для работы с Maxima
Group: Editors
Requires: maxima-common = %version-%release emacs emacs-mode-auctex
Obsoletes: maxima-emacs

%description -n emacs-maxima
Set of Maxima emacs modes.

%description -n emacs-maxima -l ru_RU.UTF-8
Набор мод для работы с Maxima в редакторе Emacs.
%endif

%if %BUILD_XMAXIMA
%package xmaxima
Summary: Maxima graphical frontend
Summary (ru_RU.UTF-8): Графическая оболочка для Maxima
Group: Sciences/Mathematics
Requires: maxima-common = %version-%release tk tcl

%description xmaxima
Maxima graphical frontend written in Tcl/Tk.

%description xmaxima -l ru_RU.UTF-8
Графическая оболочка для Maxima, написанная на Tcl/Tk.
%endif

%if %BUILD_BOOK
%package book
Summary: Maxima book
Summary (ru_RU.UTF-8): Книга по Maxima
Group: Sciences/Mathematics
BuildRequires: ghostscript

%description book
Maxima book

%description book -l ru_RU.UTF-8
Книга по Maxima
%endif

%if %CVS_BUILD
%define maxima_dir    %_builddir/maxima
%else
%define maxima_dir    %_builddir/maxima-%maxima_version
%endif

%prep
%if %CVS_BUILD
%setup -q -b0 -nmaxima
%else
%setup -q -b0 -nmaxima-%maxima_version
%endif

%if %BUILD_BOOK
%__tar jxf %SOURCE7 -C doc/maximabook
%endif

%patch2 -p1

%build
%if %CVS_BUILD
#%set_automake_version 1.7
./bootstrap
%endif

touch ./src/*.mk ./src/Makefile.in

%if %BUILD_GCL_ANSI
export GCL_ANSI="yes"
%else
export GCL_ANSI=""
%endif

./configure  --with-default-lisp=%DEFAULT_LISP \
%if %BUILD_CLISP
 --enable-clisp  \
%endif
%if %BUILD_GCL
 --enable-gcl    \
%endif
%if %BUILD_CMUCL
 --enable-cmucl  \
%endif
%if %BUILD_SBCL
 --enable-sbcl   \
%endif
 --prefix=%prefix           \
 --infodir=%_infodir        \
 --mandir=%_mandir          \
 --libdir=%_libdir          \
 --datadir=%_datadir        \
 --libexecdir=%_libexecdir

make

pushd doc
 %if %BUILD_BOOK
 pushd maximabook
   make pdf-final
 popd
 %endif
 pushd intromax
   pdflatex intromax.ltx
 popd
popd  

%install
%define _findreq_default_method lib
# info files must be uncompressed
%define _compress_method no

%define maxima_libdir  %buildroot%_libdir/maxima
%define maxima_bindir     %buildroot%_bindir
%if %BUILD_EMACS
%define emacs_maxima_dir  %_datadir/emacs/site-lisp/maxima
%endif

# extra dirs and files not handled by standard make install


#  emacs modes

%if %BUILD_EMACS
install -d %buildroot%emacs_maxima_dir
install -d %buildroot%_sysconfdir/emacs/site-start.d
install -d %buildroot%_datadir/texmf/tex/latex/emaxima
%endif

#  documentation

install -d %buildroot%_docdir/maxima-%version
install -d %buildroot%_docdir/maxima-%version/implementation
%if %BUILD_BOOK
install -d %buildroot%_docdir/maxima-%version/maximabook
%endif
%if %BUILD_EMACS
install -d %buildroot%_docdir/maxima-%version/emaxima
%endif

%if %BUILD_XMAXIMA
# icons
install -D -m644 %SOURCE1 %buildroot%_miconsdir/maxima.xpm
install -D -m644 %SOURCE2 %buildroot%_iconsdir/maxima.xpm
install -D -m644 %SOURCE3 %buildroot%_liconsdir/maxima.xpm
# menu items
install -D -m644 %SOURCE4 %buildroot%_menudir/maxima-xmaxima
%endif

# emacs modes

%if %BUILD_EMACS
#  emaxima
install -D -m644 \
 %maxima_dir/interfaces/emacs/emaxima/*.el \
 %maxima_dir/interfaces/emacs/emaxima/*.lisp \
   %buildroot%emacs_maxima_dir
install -D -m644 \
 %maxima_dir/interfaces/emacs/emaxima/*.sty \
   %buildroot%_datadir/texmf/tex/latex/emaxima/emaxima.sty
#  old modes
install -D -m644 \
 %maxima_dir/interfaces/emacs/misc/*.el \
   %buildroot%emacs_maxima_dir
# site start
install -D -m644 %SOURCE6 %buildroot%_sysconfdir/emacs/site-start.d/maxima.el
echo "(setq load-path (cons \"%emacs_maxima_dir\" load-path))" >> \
 %buildroot%_sysconfdir/emacs/site-start.d/maxima.el
%endif

# documentation

%define maxima_docdir %buildroot%_docdir/maxima-%version
install -D -m644 COPY* AUT* NEW* READ* INST* Change* doc/contrib* %maxima_docdir
%if %BUILD_BOOK
install -D -m644 %maxima_dir/doc/maximabook/maxima.pdf %maxima_docdir/maxima.pdf
%endif
install -D -m644 %maxima_dir/doc/intromax/intromax.pdf %maxima_docdir/intromax.pdf
install -D -m644 %maxima_dir/doc/implementation/*.txt %maxima_docdir/implementation
%if %BUILD_EMACS
install -D -m644 %maxima_dir/doc/emaxima/EMaximaIntro.ps %maxima_docdir/emaxima/EMaximaIntro.ps
%endif

cd %maxima_dir

%makeinstall

%files common
%_bindir/maxima
%_bindir/rmaxima
%_infodir/maxima*
%_mandir/man1/maxima.1*
%dir %_libexecdir/maxima
%dir %_libexecdir/maxima/%maxima_version
%_libexecdir/maxima/%maxima_version/omplotdata
%_libexecdir/maxima/%maxima_version/mgnuplot
%dir %_datadir/maxima
%dir %_datadir/maxima/%maxima_version
%_datadir/maxima/%maxima_version/demo
%dir %_datadir/maxima/%maxima_version/doc
%dir %_datadir/maxima/%maxima_version/doc/html
%_datadir/maxima/%maxima_version/doc/html/maxima*.html
%_datadir/maxima/%maxima_version/doc/share
%_datadir/maxima/%maxima_version/share
%_datadir/maxima/%maxima_version/src
%_datadir/maxima/%maxima_version/tests
%_datadir/maxima/%maxima_version/msgs
%dir %_docdir/maxima-%version
%doc %_docdir/maxima-%version/COPY*
%doc %_docdir/maxima-%version/AUT*
%doc %_docdir/maxima-%version/NEW*
%doc %_docdir/maxima-%version/READ*
%doc %_docdir/maxima-%version/INST*
%doc %_docdir/maxima-%version/Change*
%doc %_docdir/maxima-%version/contrib*
%doc %_docdir/maxima-%version/intromax.pdf
%doc %_docdir/maxima-%version/implementation

%if %BUILD_CLISP
%files bin-clisp
%dir %_libdir/maxima
%dir %_libdir/maxima/%maxima_version
%_libdir/maxima/%maxima_version/binary-clisp
%endif

%if %BUILD_GCL
%files bin-gcl
%dir %_libdir/maxima
%dir %_libdir/maxima/%maxima_version
%_libdir/maxima/%maxima_version/binary-gcl
%endif

%if %BUILD_CMUCL
%files bin-cmucl
%dir %_libdir/maxima
%dir %_libdir/maxima/%maxima_version
%_libdir/maxima/%maxima_version/binary-cmucl
%endif

%if %BUILD_SBCL
%files bin-sbcl
%dir %_libdir/maxima
%dir %_libdir/maxima/%maxima_version
%_libdir/maxima/%maxima_version/binary-sbcl
%endif

%if %BUILD_EMACS
%files -n emacs-maxima
%emacs_maxima_dir
%_sysconfdir/emacs/site-start.d/*.el
%_datadir/texmf/tex/latex/emaxima
%dir %_docdir/maxima-%version
%doc %_docdir/maxima-%version/emaxima
%endif

%if %BUILD_XMAXIMA
%files xmaxima
%_bindir/xmaxima
%_menudir/maxima-xmaxima
%_iconsdir/maxima.xpm
%_miconsdir/maxima.xpm
%_liconsdir/maxima.xpm
%dir %_datadir/maxima
%dir %_datadir/maxima/%maxima_version
%_datadir/maxima/%maxima_version/xmaxima
%endif

%if %BUILD_BOOK
%files book
%dir %_docdir/maxima-%version
%doc %_docdir/maxima-%version/maxima.pdf
%endif

#%clean


%post common
%install_info maxima.info

%preun common
%uninstall_info maxima.info

%if %BUILD_XMAXIMA
%post xmaxima
%update_menus

%postun xmaxima
%clean_menus
%endif

%if %BUILD_EMACS
%post -n emacs-maxima
TEXHASH=/usr/bin/texhash
[ -x "$TEXHASH" ] || "$TEXHASH" 2>/dev/null ||:

%postun -n emacs-maxima
TEXHASH=/usr/bin/texhash
[ -x "$TEXHASH" ] || "$TEXHASH" 2>/dev/null ||:
%endif

%changelog

changelog

 
: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
: Michael Shigorin