>>>>> "Rex" == Rex Dieter <rdieter@math.unl.edu> wrote:
Rex> FYI,
Rex> I've submitted maxima for inclusion into Fedora Extras:
Rex> maxima-5.9.0: http://bugzilla.fedora.us/show_bug.cgi?id=754
Rex> maxima-5.9.0.9beta2
Rex> http://bugzilla.fedora.us/show_bug.cgi?id=1948
Rex> Feedback is welcome.
I have recently made some refinements to a .src.rpm file
originally written by James Amundson <amundson@fnal.gov> for
maxima-5.9.0.9beta2 (exactly your version) for RedHat 9. Perhaps you
could incorporate also my improvements in a subsequent release.
I have looked at your .src.rpm file and these refinements appears to
be missing. Here is a description:
- the file maxima.el looks into "/usr/local/info" for .info files,
while it should look into /usr/share/info, and it also looks for the
wrong .info file for the index, .info-15 rather than .info-16.
Solution:
> %prep
>
> [...]
> %if %{build_emacs}
> perl -i -pe 's:/usr/local/info:/usr/share/info:' \
> interfaces/emacs/emaxima/maxima.el
> perl -i -pe \
> 's/(defcustom\s+maxima-info-index-file\s+)(\S+)/$1\"maxima.info-16\"/' \
> interfaces/emacs/emaxima/maxima.el
> %endif
- If I understand correctly, your -emacs rpm duplicates emacs
files that are also included in the main maxima package
in /usr/share/maxima. Also, it deletes one .el file, to remove
a conflict with the gcl rpm, introducting a dependence on gcl
to use the maxima.el mode. Furthermore, no package is installed
for xemacs.
In my .rpm I delete the emacs and latex related files from
/usr/share/maxima to avoid duplication, and properly package them
both for emacs and for xemacs in the -emacs rpm file. Furthermore,
the conflict and the dependence from gcl are removed, by packaging
the emacs files in a proper subdirectory.
Here is the .spec fragment:
> %if %{build_emacs}
>
> %{__rm} -rf %{buildroot}/%{_datadir}/maxima/%{version}/emacs
>
> # --- emaxima LaTeX style
> # install -d %{buildroot}%{_datadir}/texmf/tex/latex/emaxima
> install -D -m644 \
> interfaces/emacs/emaxima/emaxima.sty \
> %{buildroot}%{_datadir}/texmf/tex/latex/emaxima/emaxima.sty
> #
> # emaxima for emacs
> #
> install -d %{buildroot}%{_datadir}/emacs/site-lisp/maxima
> install -d %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d
> install -D -m644 \
> interfaces/emacs/emaxima/*.el \
> interfaces/emacs/emaxima/*.lisp \
> %{buildroot}%{_datadir}/emacs/site-lisp/maxima
> # --- emacs pkg init file
> install -D -m644 \
> interfaces/emacs/misc/*.el \
> %{buildroot}%{_datadir}/emacs/site-lisp/maxima
> install -D -m644 %SOURCE6 \
> %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d/maxima.el
>
> #
> # emaxima for xemacs
> #
> %define xemacspkgdir %{_datadir}/xemacs/site-packages
> install -d %{buildroot}%{xemacspkgdir}/lisp/maxima
> install -d %{buildroot}%{xemacspkgdir}/lisp/site-start.d
> install -D -m644 \
> interfaces/emacs/emaxima/*.el \
> interfaces/emacs/emaxima/*.lisp \
> %{buildroot}%{xemacspkgdir}/lisp/maxima
> # --- xemacs pkg init file
> install -D -m644 \
> interfaces/emacs/misc/*.el \
> %{buildroot}%{xemacspkgdir}/lisp/maxima
> install -D -m644 %SOURCE6 \
> %{buildroot}%{xemacspkgdir}/lisp/site-start.d/maxima.el
>
> %endif
- in your package, there is no texhash call for the installed tex
file (which is left in /usr/share/maxima). My -emacs rpm includes:
> %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
Your rpm does not produce the maxima book, whose sources are included
in the maxima tar file. Some work has to be done in order to produce
a PDF file from the provided sources:
- the breqn latex package has to be included
- two .tex files in the distribution must be replaced
This is how I build maxima.pdf and intromax.pdf:
> %build
> [...]
> %if %{build_book}
> %__tar jxf %SOURCE7 -C doc/maximabook
> %endif
> pushd doc
> %if %{build_book}
> pushd maximabook
> cp ../../share/physics/dimension.tex ../../share/physics/dimension.tex-
> cp %SOURCE8 ../../share/physics/dimension.tex
> cp %SOURCE9 ../../share/calculus/pdiff.tex
> TEXINPUTS="${TEXINPUTS}${PWD}/../..:"; export TEXINPUTS; make pdf-final
> rm -f ../../share/calculus/pdiff.tex
> mv -f ../../share/physics/dimension.tex- ../../share/physics/dimension.tex
> popd
> %endif
> pushd intromax
> pdflatex intromax.ltx
> popd
> popd
>
I attach the whole spec file:
Attached file: maxima.spec