auctex-vl.spec 9.6 KB

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