auctex-vl.spec 10 KB

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