%define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(post):%%{NAME} >= %%{VERSION}' %1| grep -v "is not") %define origname auctex %define emacspkg preview-latex %define texmf %{_datadir}/texmf %define build_texmf %{buildroot}%{texmf} %define exec_texhash [ -x %{_bindir}/texhash ] && %{_bindir}/env - %{_bindir}/texhash 2> /dev/null %define exec_updmap [ -x %{_bindir}/updmap-sys ] && %{_bindir}/env - %{_bindir}/updmap-sys --nostop 2> /dev/null Summary: Enhanced TeX modes for Emacsen Name: %{origname} Version: 11.86 Release: 5%{?_dist_release} Group: Applications/Editors/Emacs License: GPLv3+ URL: http://www.gnu.org/software/auctex/ Source: http://ftp.gnu.org/pub/gnu/auctex/auctex-%{version}.tar.gz Source1: %{origname}-install.sh Source2: %{origname}-remove.sh Source3: %{origname}-init.el Source4: vine-default-%{origname}.el Source5: %{emacspkg}-install.sh Source6: %{emacspkg}-remove.sh Source7: %{emacspkg}-init.el Source8: vine-default-%{emacspkg}.el ## for vl5 Source13: %{origname}-init-vl5.el Source14: vine-default-%{origname}-vl5.el Source17: %{emacspkg}-init-vl5.el Source18: vine-default-%{emacspkg}-vl5.el ## vine ## for vl5 Patch: auctex-11.86-vine.patch ## for vl6 or higher Patch1: auctex-11.86-plt09-vine.patch Requires: %{emacspkg} = %{version}-%{release} BuildRequires: texinfo %if %{?_dist_release} == "vl5" BuildRequires: tetex %else BuildRequires: texlive %endif ## Note: "BR: emacs >= 23.1" need to build auctex BuildRequires: emacs >= 23.1 %prereq_ge emacsen emacsen-common Requires(post): /sbin/install-info Obsoletes: auctex-emacs auctex-xemacs BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root Vendor: Project Vine Distribution: Vine Linux Packager: munepi %description 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. If you are AUCTeX user and you install both yatex and auctex on your system, you may add the following configure in your emacs init file %if %{?_dist_release} == "vl5" ~/.emacs.el: %else ~/.emacs.d/emacsXX-vine-default.el (XX: emacs major version): %endif ;; I am AUCTeX user!!! (setq vine-default-yatex nil) %package -n %{emacspkg} Summary: Emacs/LaTeX inline preview Group: Applications/Editors/Emacs Requires(post): %{origname} = %{version}-%{release} BuildRequires: emacsen %prereq_ge emacsen-common %description -n %{emacspkg} 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. Does your neck hurt from turning between previewer windows and the source too often? This Elisp/LaTeX package will render your displayed LaTeX equations right into the editing window where they belong. %prep %setup -q -n %{origname}-%{version} %if %{?_dist_release} == "vl5" %patch -p1 -b .vine %else %patch1 -p1 -b .vine %endif %build %configure --with-emacs INSTALL_INFO=: --without-texmf-dir %__make ## output auctex.el %__cp -a auctex.el auctex.el.vine cat>auctex.el< %__install -p -m0644 *.el \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/ %__cp -ra images style \ ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name}/ %if %{?_dist_release} == "vl5" %__install -p -m0644 %{SOURCE13} \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{origname}-init.el %__install -p -m0644 %{SOURCE14} \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/vine-default-%{origname}.el %else %__install -p -m0644 %{SOURCE3} %{SOURCE4} \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/ %endif ## ## pushd preview %__install -p -m0644 *.el \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/ %__cp -ra images \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/ popd %if %{?_dist_release} == "vl5" %__install -p -m0644 %{SOURCE17} \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/%{emacspkg}-init.el %__install -p -m0644 %{SOURCE18} \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/vine-default-%{emacspkg}.el %else %__install -p -m0644 %{SOURCE7} %{SOURCE8} \ ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/ %endif ## # # install info files # %__install -p -m 0644 doc/%{origname}.info doc/%{emacspkg}.info \ ${RPM_BUILD_ROOT}%{_infodir}/ # # install script (bytecompile el and install elc, remove) # %_installemacsenscript %{origname} %{SOURCE1} %_removeemacsenscript %{origname} %{SOURCE2} %_installemacsenscript %{emacspkg} %{SOURCE5} %_removeemacsenscript %{emacspkg} %{SOURCE6} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && %__rm -rf ${RPM_BUILD_ROOT} %post # # bytecompile and install # if [ "$1" = 2 ]; then %_emacsenPackageRemove %{origname} fi %_addemacsenlist %{origname} %_emacsenPackageInstall %{origname} /sbin/install-info %{_infodir}/%{origname}.info.gz %{_infodir}/dir \ --section="A much enhanced LaTeX mode for GNU Emacs" %post -n %{emacspkg} # # bytecompile and install # if [ "$1" = 2 ]; then %_emacsenPackageRemove %{emacspkg} fi %_addemacsenlist %{emacspkg} %_emacsenPackageInstall %{emacspkg} /sbin/install-info \ %{_infodir}/%{emacspkg}.info.gz %{_infodir}/dir \ --section="A much enhanced LaTeX mode for GNU Emacs" %preun if [ "$1" = 0 ]; then %_emacsenPackageRemove %{origname} %_removeemacsenlist %{origname} /sbin/install-info --delete \ %{_infodir}/%{origname}.info.gz %{_infodir}/dir \ --section="A much enhanced LaTeX mode for GNU Emacs" fi %preun -n %{emacspkg} if [ "$1" = 0 ]; then %_emacsenPackageRemove %{emacspkg} %_removeemacsenlist %{emacspkg} /sbin/install-info --delete \ %{_infodir}/preview-latex.info.gz %{_infodir}/dir \ --section="A much enhanced LaTeX mode for GNU Emacs" fi %files %defattr(-,root,root) %doc CHANGES COPYING ChangeLog FAQ INSTALL README RELEASE TODO doc/*.{tex,pdf} %{_infodir}/%{origname}* %{_datadir}/emacs/site-lisp/%{origname}/ %{emacsen_pkgdir}/install/%{origname} %{emacsen_pkgdir}/remove/%{origname} %files -n %{emacspkg} %defattr(-,root,root) %doc preview/COPYING preview/ChangeLog{,.1} %{_infodir}/%{emacspkg}* %{texmf}/doc/latex/preview/preview.pdf %{texmf}/tex/latex/preview/* %{_datadir}/emacs/site-lisp/%{emacspkg}/ %{emacsen_pkgdir}/install/%{emacspkg} %{emacsen_pkgdir}/remove/%{emacspkg} %changelog * Thu Jun 23 2011 Munehiro Yamamoto 11.86-5 - For vl5, reverted initial elisp files to 11.86-2 * Thu Jun 23 2011 Munehiro Yamamoto 11.86-4 - supported TeX Live 2009 * Tue Feb 22 2011 Munehiro Yamamoto 11.86-3 - updated auctex-init.el and preview-latex-init.el - output "Loading vine-default-xxxxx ..." to the buffer *Messages* * Mon Jan 03 2011 Munehiro Yamamoto 11.86-2 - fixed requirements - set BuildRequires: emacs >= 23.1 - set BuildRequires: texlive (for vl6) * Sun Mar 28 2010 Munehiro Yamamoto 11.86-1 - new versioning release * Sun Sep 13 2009 Munehiro Yamamoto 11.85-1 - new versioning release - dropped old version patches - changed to GPLv3+ in License tag - changed to http://www.gnu.org/software/auctex/ in URL tag - download from http://ftp.gnu.org/pub/gnu/auctex in Source0 - added preview-latex package - setup vine-default * Sun Sep 14 2008 Shu KONNO 11.13-1vl5 - applied new versioning policy, spec in utf-8 - added macro %%emacsen_pkgdir * Tue Sep 12 2006 Ryoichi INAGAKI 11.13-0vl2 - changed Group to Appliations/Editors/Emacs - s/Copyright/License/ * Wed Dec 25 2002 Jun Nishii 11.13-0vl1 - ver.up * Mon Apr 22 2002 Jun Nishii 10.0g-0vl3 - minor fix of tex-jp.el * Wed Mar 6 2002 Jun Nishii 10.0g-0vl2 - emasenize * Tue Apr 24 2001 Jun Nishii - 10.0g-0vl1 * Thu Sep 21 2000 Jun Nishii - 9.10p-0vl2 - minor modification of spec file * Fri Jan 14 2000 Jun Nishii - 9.10p-0vl1 - change directories - minor customization * Wed Dec 22 1999 Jun Nishii - 9.10p * Thu Dec 16 1999 Jun Nishii - build auctex for emacs * Fri Feb 19 1999 Jun Nishii - updated to 9.9p * Sat Nov 14 1998 Jun Nishii - first release for 9.8l