auctex-vl.spec 11 KB

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