auctex-vl.spec 8.7 KB

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