1 | %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(post):%%{NAME} >= %%{VERSION}' %1| grep -v "is not") |
---|
2 | |
---|
3 | %define origname auctex |
---|
4 | %define emacspkg preview-latex |
---|
5 | |
---|
6 | %define texmf %{_datadir}/texmf |
---|
7 | %define build_texmf %{buildroot}%{texmf} |
---|
8 | |
---|
9 | %define exec_texhash [ -x %{_bindir}/texhash ] && %{_bindir}/env - %{_bindir}/texhash 2> /dev/null |
---|
10 | %define exec_updmap [ -x %{_bindir}/updmap-sys ] && %{_bindir}/env - %{_bindir}/updmap-sys --nostop 2> /dev/null |
---|
11 | |
---|
12 | |
---|
13 | Summary: Enhanced TeX modes for Emacsen |
---|
14 | Name: %{origname} |
---|
15 | Version: 11.86 |
---|
16 | Release: 6%{?_dist_release} |
---|
17 | Group: Applications/Editors/Emacs |
---|
18 | License: GPLv3+ |
---|
19 | URL: http://www.gnu.org/software/auctex/ |
---|
20 | Source: http://ftp.gnu.org/pub/gnu/auctex/auctex-%{version}.tar.gz |
---|
21 | Source1: %{origname}-install.sh |
---|
22 | Source2: %{origname}-remove.sh |
---|
23 | Source3: %{origname}-init.el |
---|
24 | Source4: vine-default-%{origname}.el |
---|
25 | |
---|
26 | Source5: %{emacspkg}-install.sh |
---|
27 | Source6: %{emacspkg}-remove.sh |
---|
28 | Source7: %{emacspkg}-init.el |
---|
29 | Source8: vine-default-%{emacspkg}.el |
---|
30 | |
---|
31 | ## for vl5 |
---|
32 | Source13: %{origname}-init-vl5.el |
---|
33 | Source14: vine-default-%{origname}-vl5.el |
---|
34 | Source17: %{emacspkg}-init-vl5.el |
---|
35 | Source18: vine-default-%{emacspkg}-vl5.el |
---|
36 | |
---|
37 | ## vine |
---|
38 | ## for vl5 |
---|
39 | Patch: auctex-11.86-vine.patch |
---|
40 | ## for vl6 |
---|
41 | Patch1: auctex-11.86-plt09-vine.patch |
---|
42 | ## for vl7 or higher |
---|
43 | Patch2: auctex-11.86-vine-vl7.patch |
---|
44 | |
---|
45 | Requires: %{emacspkg} = %{version}-%{release} |
---|
46 | BuildRequires: texinfo |
---|
47 | %if %{?_dist_release} == "vl5" |
---|
48 | BuildRequires: tetex |
---|
49 | %else |
---|
50 | BuildRequires: texlive-common >= 2009 |
---|
51 | %endif |
---|
52 | ## Note: "BR: emacs >= 23.1" need to build auctex |
---|
53 | BuildRequires: emacs >= 23.1 |
---|
54 | |
---|
55 | %prereq_ge emacsen emacsen-common |
---|
56 | Requires(post): /sbin/install-info |
---|
57 | |
---|
58 | Obsoletes: auctex-emacs auctex-xemacs |
---|
59 | |
---|
60 | BuildArch: noarch |
---|
61 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
62 | |
---|
63 | Vendor: Project Vine |
---|
64 | Distribution: Vine Linux |
---|
65 | Packager: munepi |
---|
66 | |
---|
67 | |
---|
68 | %description |
---|
69 | AUCTeX is an extensible package that supports writing and formatting TeX files |
---|
70 | for most variants of Emacs. |
---|
71 | |
---|
72 | AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX, |
---|
73 | Texinfo and basic support for ConTeXt. Documentation can be found under |
---|
74 | /usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ. The AUCTeX |
---|
75 | manual is available in Emacs info (C-h i d m AUCTeX RET). On the AUCTeX home |
---|
76 | page, we provide manuals in various formats. |
---|
77 | |
---|
78 | This version of AUCTeX comes with preview-latex, an addictive productivity |
---|
79 | tool providing a fine-grained interactive folding WYSIWYG display in the |
---|
80 | source buffer. |
---|
81 | |
---|
82 | If you are AUCTeX user and you install both yatex and auctex on your system, |
---|
83 | you may add the following configure in your emacs init file |
---|
84 | %if %{?_dist_release} == "vl5" |
---|
85 | ~/.emacs.el: |
---|
86 | %else |
---|
87 | ~/.emacs.d/emacsXX-vine-default.el (XX: emacs major version): |
---|
88 | %endif |
---|
89 | |
---|
90 | ;; I am AUCTeX user!!! |
---|
91 | (setq vine-default-yatex nil) |
---|
92 | |
---|
93 | |
---|
94 | %package -n %{emacspkg} |
---|
95 | Summary: Emacs/LaTeX inline preview |
---|
96 | Group: Applications/Editors/Emacs |
---|
97 | Requires(post): %{origname} = %{version}-%{release} |
---|
98 | BuildRequires: emacsen |
---|
99 | %prereq_ge emacsen-common |
---|
100 | |
---|
101 | %description -n %{emacspkg} |
---|
102 | AUCTeX is an extensible package that supports writing and formatting TeX files |
---|
103 | for most variants of Emacs. |
---|
104 | |
---|
105 | AUCTeX supports many different TeX macro packages, including AMS-TeX, LaTeX, |
---|
106 | Texinfo and basic support for ConTeXt. Documentation can be found under |
---|
107 | /usr/share/doc, e.g. the reference card (tex-ref.pdf) and the FAQ. The AUCTeX |
---|
108 | manual is available in Emacs info (C-h i d m AUCTeX RET). On the AUCTeX home |
---|
109 | page, we provide manuals in various formats. |
---|
110 | |
---|
111 | This version of AUCTeX comes with preview-latex, an addictive productivity |
---|
112 | tool providing a fine-grained interactive folding WYSIWYG display in the |
---|
113 | source buffer. |
---|
114 | |
---|
115 | Does your neck hurt from turning between previewer windows and the |
---|
116 | source too often? This Elisp/LaTeX package will render your displayed |
---|
117 | LaTeX equations right into the editing window where they belong. |
---|
118 | |
---|
119 | |
---|
120 | %prep |
---|
121 | %setup -q -n %{origname}-%{version} |
---|
122 | |
---|
123 | %if %{?_dist_release} == "vl5" |
---|
124 | %patch -p1 -b .vine |
---|
125 | %endif |
---|
126 | %if %{?_dist_release} == "vl6" |
---|
127 | %patch1 -p1 -b .vine |
---|
128 | %endif |
---|
129 | %if %{?_dist_release} == "vl7" |
---|
130 | %patch2 -p1 -b .vine |
---|
131 | %endif |
---|
132 | |
---|
133 | |
---|
134 | %build |
---|
135 | %configure --with-emacs INSTALL_INFO=: --without-texmf-dir |
---|
136 | %__make |
---|
137 | |
---|
138 | ## output auctex.el |
---|
139 | %__cp -a auctex.el auctex.el.vine |
---|
140 | cat>auctex.el<<EOF |
---|
141 | ;;; auctex.el |
---|
142 | ;; |
---|
143 | ;; This can be used for starting up AUCTeX. The following somewhat |
---|
144 | ;; strange trick causes tex-site.el to be loaded in a way that can be |
---|
145 | ;; safely undone using (unload-feature 'tex-site). |
---|
146 | ;; |
---|
147 | ;; (autoload 'TeX-load-hack |
---|
148 | ;; "/some/where/tex-site.el") |
---|
149 | ;; (TeX-load-hack) |
---|
150 | |
---|
151 | ;; |
---|
152 | ;; No any settings provide in this file. |
---|
153 | ;; |
---|
154 | EOF |
---|
155 | |
---|
156 | ## remove all *.elc |
---|
157 | find . -type f -name "*.elc" -exec %__rm -f {} ';' |
---|
158 | |
---|
159 | |
---|
160 | %install |
---|
161 | |
---|
162 | [ "${RPM_BUILD_ROOT}" != "/" ] && %__rm -rf ${RPM_BUILD_ROOT} |
---|
163 | |
---|
164 | ## install preview package |
---|
165 | pushd preview |
---|
166 | %__make install-texmf \ |
---|
167 | previewtexmfdir=%{build_texmf}/tex/latex/preview \ |
---|
168 | previewdocdir=%{build_texmf}/doc/latex/preview |
---|
169 | %__rm -f %{build_texmf}/doc/latex/preview/preview.dvi |
---|
170 | %__install -p -m0644 latex/preview.pdf %{build_texmf}/doc/latex/preview/ |
---|
171 | popd |
---|
172 | |
---|
173 | |
---|
174 | %__mkdir_p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name} |
---|
175 | %__mkdir_p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{emacspkg} |
---|
176 | %__mkdir_p $RPM_BUILD_ROOT/%{emacsen_pkgdir}/install |
---|
177 | %__mkdir_p $RPM_BUILD_ROOT/%{emacsen_pkgdir}/remove |
---|
178 | %__mkdir_p ${RPM_BUILD_ROOT}%{_infodir} |
---|
179 | |
---|
180 | |
---|
181 | # |
---|
182 | # install el files |
---|
183 | # |
---|
184 | |
---|
185 | ## <auctex> |
---|
186 | %__install -p -m0644 *.el \ |
---|
187 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/ |
---|
188 | %__cp -ra images style \ |
---|
189 | ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name}/ |
---|
190 | |
---|
191 | %if %{?_dist_release} == "vl5" |
---|
192 | %__install -p -m0644 %{SOURCE13} \ |
---|
193 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{origname}-init.el |
---|
194 | %__install -p -m0644 %{SOURCE14} \ |
---|
195 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/vine-default-%{origname}.el |
---|
196 | %else |
---|
197 | %__install -p -m0644 %{SOURCE3} %{SOURCE4} \ |
---|
198 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/ |
---|
199 | %endif |
---|
200 | ## </auctex> |
---|
201 | |
---|
202 | ## <preview-latex> |
---|
203 | pushd preview |
---|
204 | %__install -p -m0644 *.el \ |
---|
205 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/ |
---|
206 | %__cp -ra images \ |
---|
207 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/ |
---|
208 | popd |
---|
209 | |
---|
210 | %if %{?_dist_release} == "vl5" |
---|
211 | %__install -p -m0644 %{SOURCE17} \ |
---|
212 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/%{emacspkg}-init.el |
---|
213 | %__install -p -m0644 %{SOURCE18} \ |
---|
214 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/vine-default-%{emacspkg}.el |
---|
215 | %else |
---|
216 | %__install -p -m0644 %{SOURCE7} %{SOURCE8} \ |
---|
217 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{emacspkg}/ |
---|
218 | %endif |
---|
219 | ## </preview-latex> |
---|
220 | |
---|
221 | |
---|
222 | # |
---|
223 | # install info files |
---|
224 | # |
---|
225 | |
---|
226 | %__install -p -m 0644 doc/%{origname}.info doc/%{emacspkg}.info \ |
---|
227 | ${RPM_BUILD_ROOT}%{_infodir}/ |
---|
228 | |
---|
229 | |
---|
230 | # |
---|
231 | # install script (bytecompile el and install elc, remove) |
---|
232 | # |
---|
233 | |
---|
234 | %_installemacsenscript %{origname} %{SOURCE1} |
---|
235 | |
---|
236 | %_removeemacsenscript %{origname} %{SOURCE2} |
---|
237 | |
---|
238 | %_installemacsenscript %{emacspkg} %{SOURCE5} |
---|
239 | |
---|
240 | %_removeemacsenscript %{emacspkg} %{SOURCE6} |
---|
241 | |
---|
242 | |
---|
243 | %clean |
---|
244 | [ "${RPM_BUILD_ROOT}" != "/" ] && %__rm -rf ${RPM_BUILD_ROOT} |
---|
245 | |
---|
246 | |
---|
247 | %post |
---|
248 | # |
---|
249 | # bytecompile and install |
---|
250 | # |
---|
251 | |
---|
252 | if [ "$1" = 2 ]; then |
---|
253 | |
---|
254 | %_emacsenPackageRemove %{origname} |
---|
255 | |
---|
256 | fi |
---|
257 | |
---|
258 | %_addemacsenlist %{origname} |
---|
259 | |
---|
260 | %_emacsenPackageInstall %{origname} |
---|
261 | |
---|
262 | /sbin/install-info %{_infodir}/%{origname}.info.gz %{_infodir}/dir \ |
---|
263 | --section="A much enhanced LaTeX mode for GNU Emacs" |
---|
264 | |
---|
265 | |
---|
266 | %post -n %{emacspkg} |
---|
267 | # |
---|
268 | # bytecompile and install |
---|
269 | # |
---|
270 | |
---|
271 | if [ "$1" = 2 ]; then |
---|
272 | |
---|
273 | %_emacsenPackageRemove %{emacspkg} |
---|
274 | |
---|
275 | fi |
---|
276 | |
---|
277 | %_addemacsenlist %{emacspkg} |
---|
278 | |
---|
279 | %_emacsenPackageInstall %{emacspkg} |
---|
280 | |
---|
281 | /sbin/install-info \ |
---|
282 | %{_infodir}/%{emacspkg}.info.gz %{_infodir}/dir \ |
---|
283 | --section="A much enhanced LaTeX mode for GNU Emacs" |
---|
284 | |
---|
285 | |
---|
286 | %preun |
---|
287 | if [ "$1" = 0 ]; then |
---|
288 | %_emacsenPackageRemove %{origname} |
---|
289 | |
---|
290 | %_removeemacsenlist %{origname} |
---|
291 | |
---|
292 | /sbin/install-info --delete \ |
---|
293 | %{_infodir}/%{origname}.info.gz %{_infodir}/dir \ |
---|
294 | --section="A much enhanced LaTeX mode for GNU Emacs" |
---|
295 | fi |
---|
296 | |
---|
297 | |
---|
298 | %preun -n %{emacspkg} |
---|
299 | if [ "$1" = 0 ]; then |
---|
300 | |
---|
301 | %_emacsenPackageRemove %{emacspkg} |
---|
302 | |
---|
303 | %_removeemacsenlist %{emacspkg} |
---|
304 | |
---|
305 | /sbin/install-info --delete \ |
---|
306 | %{_infodir}/preview-latex.info.gz %{_infodir}/dir \ |
---|
307 | --section="A much enhanced LaTeX mode for GNU Emacs" |
---|
308 | fi |
---|
309 | |
---|
310 | |
---|
311 | %files |
---|
312 | %defattr(-,root,root) |
---|
313 | %doc CHANGES COPYING ChangeLog FAQ INSTALL README RELEASE TODO doc/*.{tex,pdf} |
---|
314 | %{_infodir}/%{origname}* |
---|
315 | %{_datadir}/emacs/site-lisp/%{origname}/ |
---|
316 | %{emacsen_pkgdir}/install/%{origname} |
---|
317 | %{emacsen_pkgdir}/remove/%{origname} |
---|
318 | |
---|
319 | |
---|
320 | %files -n %{emacspkg} |
---|
321 | %defattr(-,root,root) |
---|
322 | %doc preview/COPYING preview/ChangeLog{,.1} |
---|
323 | %{_infodir}/%{emacspkg}* |
---|
324 | %{texmf}/doc/latex/preview/preview.pdf |
---|
325 | %{texmf}/tex/latex/preview/* |
---|
326 | %{_datadir}/emacs/site-lisp/%{emacspkg}/ |
---|
327 | %{emacsen_pkgdir}/install/%{emacspkg} |
---|
328 | %{emacsen_pkgdir}/remove/%{emacspkg} |
---|
329 | |
---|
330 | |
---|
331 | |
---|
332 | %changelog |
---|
333 | * Sun Dec 4 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.86-6 |
---|
334 | - applied auctex-11.86-vine-vl7.patch (vl7) |
---|
335 | - TeX Live 2011 |
---|
336 | |
---|
337 | * Thu Jun 23 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.86-5 |
---|
338 | - For vl5, reverted initial elisp files to 11.86-2 |
---|
339 | |
---|
340 | * Thu Jun 23 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.86-4 |
---|
341 | - supported TeX Live 2009 |
---|
342 | |
---|
343 | * Tue Feb 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.86-3 |
---|
344 | - updated auctex-init.el and preview-latex-init.el |
---|
345 | - output "Loading vine-default-xxxxx ..." to the buffer *Messages* |
---|
346 | |
---|
347 | * Mon Jan 03 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.86-2 |
---|
348 | - fixed requirements |
---|
349 | - set BuildRequires: emacs >= 23.1 |
---|
350 | - set BuildRequires: texlive (for vl6) |
---|
351 | |
---|
352 | * Sun Mar 28 2010 Munehiro Yamamoto <munepi@vinelinux.org> 11.86-1 |
---|
353 | - new versioning release |
---|
354 | |
---|
355 | * Sun Sep 13 2009 Munehiro Yamamoto <munepi@vinelinux.org> 11.85-1 |
---|
356 | - new versioning release |
---|
357 | - dropped old version patches |
---|
358 | - changed to GPLv3+ in License tag |
---|
359 | - changed to http://www.gnu.org/software/auctex/ in URL tag |
---|
360 | - download from http://ftp.gnu.org/pub/gnu/auctex in Source0 |
---|
361 | - added preview-latex package |
---|
362 | - setup vine-default |
---|
363 | |
---|
364 | * Sun Sep 14 2008 Shu KONNO <owa@bg.wakwak.com> 11.13-1vl5 |
---|
365 | - applied new versioning policy, spec in utf-8 |
---|
366 | - added macro %%emacsen_pkgdir |
---|
367 | |
---|
368 | * Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 11.13-0vl2 |
---|
369 | - changed Group to Appliations/Editors/Emacs <BTS:VineLinux:163> |
---|
370 | - s/Copyright/License/ |
---|
371 | |
---|
372 | * Wed Dec 25 2002 Jun Nishii <jun@vinelinux.org> 11.13-0vl1 |
---|
373 | - ver.up |
---|
374 | |
---|
375 | * Mon Apr 22 2002 Jun Nishii <jun@vinelinux.org> 10.0g-0vl3 |
---|
376 | - minor fix of tex-jp.el |
---|
377 | |
---|
378 | * Wed Mar 6 2002 Jun Nishii <jun@vinelinux.org> 10.0g-0vl2 |
---|
379 | - emasenize |
---|
380 | |
---|
381 | * Tue Apr 24 2001 Jun Nishii <jun@vinelinux.org> |
---|
382 | - 10.0g-0vl1 |
---|
383 | |
---|
384 | * Thu Sep 21 2000 Jun Nishii <jun@vinelinux.org> |
---|
385 | - 9.10p-0vl2 |
---|
386 | - minor modification of spec file |
---|
387 | |
---|
388 | * Fri Jan 14 2000 Jun Nishii <jun@vinelinux.org> |
---|
389 | - 9.10p-0vl1 |
---|
390 | - change directories |
---|
391 | - minor customization |
---|
392 | |
---|
393 | * Wed Dec 22 1999 Jun Nishii <jun@vinelinux.org> |
---|
394 | - 9.10p |
---|
395 | |
---|
396 | * Thu Dec 16 1999 Jun Nishii <jun@vinelinux.org> |
---|
397 | - build auctex for emacs |
---|
398 | |
---|
399 | * Fri Feb 19 1999 Jun Nishii <jun@vinelinux.org> |
---|
400 | - updated to 9.9p |
---|
401 | |
---|
402 | * Sat Nov 14 1998 Jun Nishii <jun@vinelinux.org> |
---|
403 | - first release for 9.8l |
---|
404 | |
---|