auctex-vl.spec 9.4 KB

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