Index: auctex.spec =================================================================== RCS file: /sources/auctex/auctex/auctex.spec,v retrieving revision 1.41 diff -u -r1.41 auctex.spec --- auctex.spec 17 Dec 2005 18:29:16 -0000 1.41 +++ auctex.spec 18 Dec 2005 20:32:24 -0000 @@ -1,3 +1,6 @@ +%define HAVE_EMACS %(which emacs >/dev/null 2>/dev/null && echo 1 || echo 0) +%define HAVE_XEMACS %(which xemacs >/dev/null 2>/dev/null && echo 1 || echo 0) + %define FOR_SUSE %{?suse_version:1}%{!?suse_version:0} %if %{FOR_SUSE} @@ -31,15 +34,49 @@ manual is available in Emacs info (C-h i d m AUCTeX RET). On the AUCTeX home page, we provide manuals in various formats. -%package emacs -Summary: Enhanced TeX modes for GNU Emacs +This version of AUCTeX comes with preview-latex, an addictive +productivity tool providing a fine-grained interactive folding WYSIWYG +display in the source buffer. + +%package emacs-tetex +Summary: Enhanced TeX modes for Emacs +Group: %{commongroup} +Requires: emacs >= 21.1 +Requires: tetex +Requires: preview-tetex = %{version} +Obsoletes: ge_auc emacs-auctex auctex preview-latex-common preview-latex-emacs auctex-emacs +Conflicts: emacspeak < 18 +Provides: auctex-emacs + +%description emacs-tetex +AUCTeX is an extensible package that supports writing and formatting TeX files +for most variants of Emacs. + +AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX, +Texinfo and basic support for ConTeXt. Documentation can be found under +/usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ. The AUCTeX +manual is available in Emacs info (C-h i d m AUCTeX RET). On the AUCTeX home +page, we provide manuals in various formats. + +This version of AUCTeX comes with preview-latex, an addictive +productivity tool providing a fine-grained interactive folding WYSIWYG +display in the source buffer. + +This package is for GNU Emacs and is integrated with Fedora's usual +teTeX distribution. + +The package enables AUCTeX modes system-wide. The README file +contains information how users may override this choice. + +%package emacs-anytex +Summary: Enhanced TeX modes for Emacs Group: %{commongroup} -Requires: emacs >= 21 -Obsoletes: ge_auc emacs-auctex auctex preview-latex-common preview-latex-emacs +Requires: emacs >= 21.1 +Obsoletes: ge_auc emacs-auctex auctex preview-latex-emacs auctex-emacs Conflicts: emacspeak < 18 -Provides: auctex +Provides: auctex-emacs -%description emacs +%description emacs-anytex AUCTeX is an extensible package that supports writing and formatting TeX files for most variants of Emacs. @@ -49,25 +86,143 @@ manual is available in Emacs info (C-h i d m AUCTeX RET). On the AUCTeX home page, we provide manuals in various formats. -This package is for GNU Emacs. XEmacs users should use the package system for -installation. +This version of AUCTeX comes with preview-latex, an addictive +productivity tool providing a fine-grained interactive folding WYSIWYG +display in the source buffer. + +This package is for GNU Emacs and should work with all flavors of TeX +distributions. Use it if you are not (or not only) using the normal +Fedora teTeX package. The package enables AUCTeX modes system-wide. The README file contains information how users may override this choice. +%package xemacs-tetex +Summary: Enhanced TeX modes for XEmacs +Group: %{commongroup} +Requires: xemacs >= 21.4.17 +Requires: tetex +Requires: preview-tetex = %{version} +Obsoletes: xemacs-auctex preview-latex-xemacs auctex-xemacs +Provides: auctex-xemacs + +%description xemacs-tetex +AUCTeX is an extensible package that supports writing and formatting TeX files +for most variants of Emacs. + +AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX, +Texinfo and basic support for ConTeXt. Documentation can be found under +/usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ. The AUCTeX +manual is available in XEmacs info (C-h i d m AUCTeX RET). On the AUCTeX home +page, we provide manuals in various formats. + +This version of AUCTeX comes with preview-latex, an addictive +productivity tool providing a fine-grained interactive folding WYSIWYG +display in the source buffer. + +This package is for XEmacs and is integrated with Fedora's usual teTeX +distribution. It will shadow the "normal", typically outdated AUCTeX +installation from XEmacs. + +The package enables AUCTeX modes system-wide. The README file +contains information how users may override this choice. + +%package xemacs-anytex +Summary: Enhanced TeX modes for XEmacs +Group: %{commongroup} +Requires: xemacs >= 21.4.17 +Obsoletes: xemacs-auctex preview-latex-xemacs auctex-xemacs +Provides: auctex-xemacs + +%description xemacs-anytex +AUCTeX is an extensible package that supports writing and formatting TeX files +for most variants of Emacs. + +AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX, +Texinfo and basic support for ConTeXt. Documentation can be found under +/usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ. The AUCTeX +manual is available in XEmacs info (C-h i d m AUCTeX RET). On the AUCTeX home +page, we provide manuals in various formats. + +This version of AUCTeX comes with preview-latex, an addictive +productivity tool providing a fine-grained interactive folding WYSIWYG +display in the source buffer. + +This package is for XEmacs and is integrated with Fedora's usual teTeX +distribution. and should work with all flavors of TeX distributions. +Use it if you are not (or not only) using the normal Fedora teTeX +package. + +The package enables AUCTeX modes system-wide. The README file +contains information how users may override this choice. + +%package preview-tetex +Summary: The preview style files +Group: %{commongroup} +Requires: tetex +Obsoletes: preview-latex-common +Provides: preview-latex-common + +%description preview-tetex + +These are the LaTeX files for the preview package. Its purpose is the +extractions of images from a LaTeX file. + %prep -%setup +%setup -c -q -%build # The below will make the package build from a tar straight from CVS # NOT RECOMMENDED, but useful for testing! +pushd ${name}-%{version} test -f ./configure || ./autogen.sh -%configure --with-emacs %{extraconfig} INSTALL_INFO=: --without-texmf-dir -make -pushd doc -make tex-ref.pdf popd +%if %{HAVE_EMACS} + rm -rf emacs emacs-anytex + cp -a %{name}-%{version} emacs + cp -a %{name}-%{version} emacs-anytex +%endif + +%if %{HAVE_XEMACS} + rm -rf xemacs xemacs-anytex + cp -a %{name}-%{version} xemacs + cp -a %{name}-%{version} xemacs-anytex +%endif + +%build + +for i in *emacs; do + pushd $i + # --with-packagedir repairs RedHat XEmacs braindamage texmf-dir + # moves the installation to a location searched before the (possibly + # conflicting) system tree. Unfortunately, this is the site-wide + # tree that we should not really be touching. Sigh. + if [ $i = "emacs" ]; then + %configure '--with-lispdir=${datadir}/emacs/site-lisp' \ + '--with-texmf-dir=${prefix}/local/share/texmf' TEXHASH=: INSTALL_INFO=: + else + %configure --with-xemacs '--with-packagedir=%{xemacspkgconfdir}' '--with-texmf-dir=${prefix}/local/share/texmf' TEXHASH=: INSTALL_INFO=: + fi + make + popd +done + +for i in *emacs-anytex; do + pushd $i + # --with-packagedir repairs RedHat XEmacs braindamage texmf-dir + # moves the installation to a location searched before the (possibly + # conflicting) system tree. Unfortunately, this is the site-wide + # tree that we should not really be touching. Sigh. + if [ $i = "emacs-anytex" ]; then + %configure '--with-lispdir=${datadir}/emacs/site-lisp' \ + '--without-texmf-dir' INSTALL_INFO=: + else + %configure --with-xemacs '--with-packagedir=%{xemacspkgconfdir}' '--without-texmf-dir' INSTALL_INFO=: + fi + make + popd +done + %install rm -rf %{buildroot} mkdir -p %{buildroot}{%{_datadir}/emacs/site-lisp/preview,%{_infodir}}