Initial Commit
[packages] / xemacs-packages / auctex / auctex.spec
1 %define FOR_SUSE    %{?suse_version:1}%{!?suse_version:0}
2
3 %if %{FOR_SUSE}
4 %define distri       .suse
5 %define commongroup  Productivity/Editors/Emacs
6 %define texgroup     Productivity/Publishing/TeX/Utilities
7 %define xemacspkgdir %{_datadir}/xemacs/xemacs-packages
8 %else
9 %define distri       .fedora
10 %define commongroup  Applications/Editors
11 %define texgroup     Applications/Publishing
12 %define xemacspkgdir %{_datadir}/xemacs/site-packages
13 %endif
14
15 Summary:        Enhanced TeX modes for Emacsen
16 Name:           auctex
17 Version:        11.84
18 Release:        1%{distri}
19 License:        GPL
20 Group:          %{commongroup}
21 URL:            http://www.gnu.org/software/auctex/
22 Source0:        ftp://ftp.gnu.org/pub/gnu/auctex/%{name}-%{version}.tar.gz
23 BuildArchitectures: noarch
24 BuildRoot:      %{_tmppath}/%{name}-root
25
26 %description
27 AUCTeX is an extensible package that supports writing and formatting TeX files
28 for most variants of Emacs.  
29
30 AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX,
31 Texinfo and basic support for ConTeXt.  Documentation can be found under
32 /usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ.  The AUCTeX
33 manual is available in Emacs info (C-h i d m AUCTeX RET).  On the AUCTeX home
34 page, we provide manuals in various formats.
35
36 This version of AUCTeX comes with preview-latex, an addictive productivity
37 tool providing a fine-grained interactive folding WYSIWYG display in the
38 source buffer.
39
40 %package emacs
41 Summary:        Enhanced TeX modes for GNU Emacs
42 Group:          %{commongroup}
43 Requires:       emacs >= 21
44 Obsoletes:      ge_auc emacs-auctex auctex preview-latex-emacs
45 Conflicts:      emacspeak < 18
46 Provides:       auctex
47
48 %description emacs
49 AUCTeX is an extensible package that supports writing and formatting TeX files
50 for most variants of Emacs.  
51
52 AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX,
53 Texinfo and basic support for ConTeXt.  Documentation can be found under
54 /usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ.  The AUCTeX
55 manual is available in Emacs info (C-h i d m AUCTeX RET).  On the AUCTeX home
56 page, we provide manuals in various formats.
57
58 This package is for GNU Emacs.  XEmacs users should use the package system for
59 installation.
60
61 The package enables AUCTeX modes system-wide.  The README file
62 contains information how users may override this choice.
63
64 %package -n preview-tetex
65 Summary:       LaTeX files for preview.sty
66 Group:         %{texgroup}
67 Requires:      tetex
68 Obsoletes:     preview-latex-common
69 Provides:      preview-tetex preview-latex-common
70
71 %description -n preview-tetex
72 The LaTeX package preview.sty can be used for extracting selected
73 parts of LaTeX documents into graphics of their own.  Various TeX and
74 editing applications use this as a subsystem.  AUCTeX by now comes
75 with its own integrated version of preview-latex and the style files
76 and does not require this package, and newer versions of teTeX might
77 already contain preview.sty (in which case the resulting conflict is
78 probably best solved by not installing this package).
79
80 %prep
81 %setup
82
83 %build
84 # The below will make the package build from a tar straight from CVS
85 # NOT RECOMMENDED, but useful for testing!
86 test -f ./configure || ./autogen.sh
87 %configure --with-emacs %{extraconfig} INSTALL_INFO=: --without-texmf-dir
88 make
89 pushd doc
90 make tex-ref.pdf
91 popd
92
93 %install
94 rm -rf %{buildroot}
95 mkdir -p %{buildroot}{%{_datadir}/emacs/site-lisp,%{_infodir}}
96 %if %{FOR_SUSE}
97 cat <<EOFA > %{buildroot}%{_datadir}/emacs/site-lisp/suse-start-auctex.el
98 ;; suse-start-auctex.el
99 ;; This file enables AUCTeX globally:
100 (load "auctex.el" nil t t)
101 ;; See (info "(auctex)Introduction") on how to disable AUCTeX.
102 EOFA
103 cat <<EOFP > %{buildroot}%{_datadir}/emacs/site-lisp/suse-start-preview-latex.el
104 ;; suse-start-preview-latex.el
105 ;; This file enables preview-latex globally:
106 (load "preview-latex.el" nil t t)
107 EOFP
108 %else
109 mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d
110 %endif
111 %makeinstall install-docs
112 mkdir -p %{buildroot}%{_datadir}/texmf/tex/latex/preview
113 cp -p preview/latex/*.{sty,def,cfg} %{buildroot}%{_datadir}/texmf/tex/latex/preview
114 mkdir -p %{buildroot}%{_datadir}/texmf/doc/latex/styles
115 cp -p preview/latex/preview.dvi %{buildroot}%{_datadir}/texmf/doc/latex/styles
116
117 %post emacs
118 /sbin/install-info --info-dir=%{_infodir} %{_infodir}/auctex.info
119 /sbin/install-info --info-dir=%{_infodir} %{_infodir}/preview-latex.info
120
121 %preun emacs
122 # $1 is the number of versions of this package installed
123 # after this uninstallation
124 if [ $1 -eq 0 ]; then
125   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/auctex.info
126   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/preview-latex.info
127 fi
128 %clean
129 rm -rf %{buildroot}
130
131 %post -n preview-tetex
132 /usr/bin/mktexlsr %{_datadir}/texmf
133
134 %postun -n preview-tetex
135 /usr/bin/mktexlsr %{_datadir}/texmf
136
137 %files -n preview-tetex
138 %defattr(-,root,root)
139 %{_datadir}/texmf/tex/latex/preview
140 %config %{_datadir}/texmf/tex/latex/preview/prauctex.cfg
141 %{_datadir}/texmf/doc/latex/styles/preview.dvi
142
143 %files emacs
144 %defattr(-,root,root)
145 %doc RELEASE COPYING INSTALL README TODO FAQ CHANGES
146 %doc doc/tex-ref.pdf
147 # %doc --parents preview/RELEASE preview/README preview/INSTALL preview/TODO preview/FAQ
148 %doc %{_infodir}/*
149 # %exclude %{_infodir}/dir
150 %{_datadir}/emacs/site-lisp/%{name}
151 %{_localstatedir}/%{name}
152 %config %{_datadir}/emacs/site-lisp/tex-site.el
153 %if %{FOR_SUSE}
154 %{_datadir}/emacs/site-lisp/auctex.el
155 %{_datadir}/emacs/site-lisp/preview-latex.el
156 %{_datadir}/emacs/site-lisp/suse-start-auctex.el
157 %{_datadir}/emacs/site-lisp/suse-start-preview-latex.el
158 %else
159 %{_datadir}/emacs/site-lisp/site-start.d/auctex.el
160 %{_datadir}/emacs/site-lisp/site-start.d/preview-latex.el
161 %endif
162
163
164 %changelog
165 # Shouldn't changelog include changes in the package instead of changes in the
166 # spec file?
167
168 * Tue Jun  6 2006 Reiner Steib  <Reiner.Steib@gmx.de>
169 - Update to AUCTeX 11.83
170
171 * Wed Dec 28 2005 Reiner Steib  <Reiner.Steib@gmx.de>
172 - Remove bogus preview directory.  Add preview-latex in description.
173
174 * Sat Dec 17 2005 Reiner Steib  <Reiner.Steib@gmx.de>
175 - Update for AUCTeX 11.82.
176
177 * Tue May  3 2005 David Kastrup <dak@gnu.org>
178 - include preview-latex, so outdate other stuff.
179
180 * Fri Jan 21 2005 David Kastrup <dak@gnu.org>
181 - Conflict with outdated Emacspeak versions
182
183 * Fri Jan 14 2005 David Kastrup <dak@gnu.org>
184 - Install and remove auctex.info, not auctex
185
186 * Thu Aug 19 2004 David Kastrup <dak@gnu.org>
187 - Change tex-site.el to overwriting config file mode.  New naming scheme.
188
189 * Mon Aug 16 2004 David Kastrup <dak@gnu.org>
190 - Attempt a bit of SuSEism.  Might work if we are lucky.
191
192 * Sat Dec  7 2002 David Kastrup <David.Kastrup@t-online.de>
193 - Change addresses to fit move to Savannah.
194
195 * Mon Apr 15 2002 Jan-Ake Larsson <jalar@imf.au.dk>
196 - Adjusted TeX-macro-global and put autoactivation in preinstall
197   script so that it can be chosen at install time.
198
199 * Tue Feb 19 2002 Jan-Ake Larsson <jalar@imf.au.dk>
200 - Added site-start.el support
201
202 * Sat Feb 16 2002 Jan-Ake Larsson <jalar@imf.au.dk>
203 - Prerelease 11.11