psgml-vl.spec 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define emacsen_pkgdir /usr/lib/emacsen-common/packages
  4. %define origname psgml
  5. %define origver 1.2.5
  6. %define release 6%{?_dist_release}
  7. Summary: A GNU emacs major mode for editing SGML documents.
  8. name: %{origname}
  9. Version: %{origver}
  10. Release: %{release}
  11. Distribution: Vine Linux
  12. Vendor: Project Vine
  13. Conflicts: %{origname}-el
  14. PreReq: emacsen
  15. PreReq: sgml-common
  16. Requires: emacsen
  17. %prereq_ge emacsen-common
  18. License: GPL
  19. Source: ftp://ftp.lysator.liu.se/pub/sgml/%{origname}-%{version}.tar.gz
  20. Source1: psgml-install.sh
  21. Source2: psgml-remove.sh
  22. Group: Applications/Editors/Emacs
  23. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  24. BuildArch: noarch
  25. Prefix: /usr
  26. #%define psgmldir %{prefix}/share/emacs/site-lisp/psgml/
  27. %description
  28. Emacs is an advanced and extensible editor. An Emacs major mode
  29. customizes Emacs for editing particular types of text documents. PSGML
  30. is a major mode for SGML (a markup language) documents. PSGML
  31. provides several functionalities for editing SGML documents:
  32. indentation according to element nesting depth and identification of
  33. structural errors (but it is not a validating SGML parser); menus and
  34. commands for inserting tags with only the contextually valid tags;
  35. attribute values can be edited in a separate window with information
  36. about types and defaults; structure based editing includes movement
  37. and killing; and also several commands for folding editing.
  38. %description -l ja
  39. Emacs は拡張性に優れたエディターです.Emacs メジャーモードは特定の
  40. テキスト文書を入力する時に Emacs をカスタマイズします.PSGML は
  41. SGML (マークアップ言語)文書用のメジャーモードです.PSGML は SGML 文書を
  42. 入力ための機能を持っています。例えば,階層構造にネストしている
  43. エレメントに従ってインデントさせたり,構造エラーを(SGML パーサで
  44. 検証しなくても)確認できます.また,文脈から正しいタグだけを挿入する
  45. メニューやコマンド,属性値は型(type) や deaults に関する情報を別
  46. ウィンドウで編集できます.また、movement や killing を含む編集を
  47. ベースにした構造、編集を保持するコマンドもあります.
  48. %prep
  49. rm -rf ${RPM_BUILD_DIR}/%{origname}-%{origver}
  50. %setup -q -n %{origname}-%{origver}
  51. %build
  52. %configure
  53. # make sure we "find" etags in the installed place...
  54. #cat > psgml-init.el << __ELISP__
  55. #;(setq load-path (append load-path '("%{psgmldir}")))
  56. #
  57. #(autoload 'sgml-mode "psgml" "Major mode for editing SGML." t)
  58. #(autoload 'xml-mode "psgml" "Major mode for editing XML." t)
  59. #(if (not (getenv "SGML_CATALOG_FILES"))
  60. # (defvar sgml-catalog-files '("CATALOG" "catalog" "%{_sysconfdir}/sgml/catalog" "%{_libdir}/sgml/CATALOG" "%{_libdir}/sgml-tools/dtd/catalog"))
  61. # "*List of catalog entry files.
  62. #The files are in the format defined in the SGML Open Draft Technical
  63. #Resolution on Entity Management.")
  64. #(put 'sgml-catalog-files 'sgml-type 'list)
  65. #
  66. #__ELISP__
  67. %install
  68. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  69. [ "${RPM_BUILD_ROOT}" != "/" ] && mkdir -p ${RPM_BUILD_ROOT}
  70. mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{origname}
  71. #mkdir -p $RPM_BUILD_ROOT%{_libdir}/emacsen-common/packages/install
  72. #mkdir -p $RPM_BUILD_ROOT%{_libdir}/emacsen-common/packages/remove
  73. mkdir -p $RPM_BUILD_ROOT%{emacsen_pkgdir}/install
  74. mkdir -p $RPM_BUILD_ROOT%{emacsen_pkgdir}/remove
  75. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/sgml/cdtd
  76. mkdir -p $RPM_BUILD_ROOT%{_infodir}
  77. #touch $RPM_BUILD_ROOT%{_infodir}/dir
  78. #
  79. # install el files
  80. #
  81. cp -a Makefile install-sh mkinstalldirs iso88591.map install-sh \
  82. psgml*.el ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{origname}
  83. #
  84. # build & install info
  85. #
  86. make EMACS=emacs infodir=${RPM_BUILD_ROOT}%{_infodir} install-info
  87. #
  88. # install script( bytecompile el and install elc , remove )
  89. #
  90. %_installemacsenscript %{origname} %{SOURCE1}
  91. %_removeemacsenscript %{origname} %{SOURCE2}
  92. #
  93. #mkdir -p ${RPM_BUILD_ROOT}%{psgmldir}
  94. #mkdir -p ${RPM_BUILD_ROOT}%{_infodir}
  95. #touch ${RPM_BUILD_ROOT}/usr/info/dir
  96. #make install infodir=${RPM_BUILD_ROOT}%{_infodir} \
  97. # prefix=${RPM_BUILD_ROOT}%{prefix} \
  98. # psgmldir=${RPM_BUILD_ROOT}%{psgmldir} \
  99. # lispdir=${RPM_BUILD_ROOT}%{psgmldir}
  100. #make install-info infodir=${RPM_BUILD_ROOT}%{_infodir}
  101. #gzip ${RPM_BUILD_ROOT}/usr/info/*.info
  102. #rm ${RPM_BUILD_ROOT}%{_infodir}/dir
  103. #cp psgml-init.el ${RPM_BUILD_ROOT}%{prefix}/share/emacs/site-lisp/
  104. %post
  105. #
  106. # bytecompile and install
  107. #
  108. if [ "$1" = 2 ]; then
  109. %_emacsenPackageRemove %{origname}
  110. fi
  111. %_addemacsenlist %{origname}
  112. %_emacsenPackageInstall %{origname}
  113. /sbin/install-info %{_infodir}/psgml.info.gz %{_infodir}/dir \
  114. --section="Emacs"
  115. /sbin/install-info %{_infodir}/psgml-api.info.gz %{_infodir}/dir \
  116. --section="Emacs"
  117. #SS=%{prefix}/share/emacs/site-lisp/site-start.el
  118. ## must version the load since the old postun runs *after* the new post...
  119. #V=%{version}-%{release}
  120. #if grep -q psgml-auto-setup-$V $SS 2>/dev/null
  121. #then
  122. # :
  123. #else
  124. # echo '(load "psgml-init") ;; psgml-auto-setup-'"$V" >> $SS
  125. #fi
  126. %preun
  127. if [ "$1" = 0 ]; then
  128. %_emacsenPackageRemove %{origname}
  129. %_removeemacsenlist %{origname}
  130. /sbin/install-info --delete %{_infodir}/psgml.info.gz %{_infodir}/dir \
  131. --section="Emacs"
  132. /sbin/install-info --delete %{_infodir}/psgml-api.info.gz %{_infodir}/dir \
  133. --section="Emacs"
  134. fi
  135. %postun
  136. #SS=%{prefix}/share/emacs/site-lisp/site-start.el
  137. #V=%{version}-%{release}
  138. #if [ "$1" = 0 ] ; then
  139. # install-info --info-dir=%{_infodir} --delete %{_infodir}/psgml.info
  140. # install-info --info-dir=%{_infodir} --delete %{_infodir}/psgml-api.info
  141. # if grep -q psgml-auto-setup-1 $SS 2>/dev/null
  142. # then
  143. # grep -v psgml-auto-setup-1 $SS > $SS.new 2>/dev/null
  144. # mv $SS.new $SS
  145. # fi
  146. #fi
  147. #if grep -q psgml-auto-setup-$V $SS
  148. #then
  149. # grep -v psgml-auto-setup-$V $SS > $SS.new 2>/dev/null
  150. # mv $SS.new $SS
  151. #fi
  152. %clean
  153. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  154. rm -rf ${RPM_BUILD_DIR}/%{origname}-%{origver}
  155. %files
  156. %defattr(-,root,root)
  157. %doc psgml.ps README.psgml
  158. %dir %{_prefix}/lib/sgml/cdtd
  159. #%{prefix}/share/emacs/site-lisp/psgml/*
  160. #%{prefix}/share/emacs/site-lisp/psgml-init.el
  161. %{_infodir}/psgml*
  162. /usr/share/emacs/site-lisp/%{origname}/
  163. #/usr/lib/emacsen-common/packages/install/%{origname}
  164. #/usr/lib/emacsen-common/packages/remove/%{origname}
  165. %{emacsen_pkgdir}/install/%{origname}
  166. %{emacsen_pkgdir}/remove/%{origname}
  167. %changelog
  168. * Fri Oct 10 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.5-6vl5
  169. - applied new versioning policy, spec in utf-8
  170. - added macro %%emacsen_pkgdir
  171. * Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.5-5vl3
  172. - changed Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  173. - s/Copyright/License/
  174. * Mon Mar 17 2003 IWAI Masaharu <iwai@alib.jp> 1.2.5-5vl2
  175. - rebuild
  176. * Sun Jul 21 2002 IWAI Masaharu <iwai@alib.jp> 1.2.5-5vl1
  177. - upstream release
  178. * Thu Jan 3 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.2.4-5vl1
  179. - upstream release
  180. - eliminated Patch1 for Emacs21 (obsoleted)
  181. - updated psgml-install.sh
  182. * Tue Jan 1 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.2.2-5vl2
  183. - emacsenize
  184. - package name changed psgml-el -> psgml again
  185. - added patch for Emacs21
  186. ( /emacs-21.0.104.xtar.gz:emacs-21.0.104/etc/PROBLEMS )
  187. - stopped creating psgml-init.el
  188. * Fri Aug 31 2001 IWAI, Masaharu <iwaim@cc.mbn.or.jp>
  189. - 1.2.2-5vl1
  190. - upstream release
  191. - build on Vine Seed
  192. - use rpm macros
  193. - package name changed psgml -> psgml-el
  194. * Mon Feb 28 2000 MACHINO, Satoshi <mac@netfort.gr.jp>
  195. - 1.2.1-5vl1
  196. - build on Vine Linux 2.0β2
  197. - added description -l ja
  198. * Wed Feb 16 2000 Bill Nottingham <notting@redhat.com>
  199. - look in old sgml-tools dirs for catalogs, to catch linuxdoc
  200. * Thu Feb 3 2000 Bill Nottingham <notting@redhat.com>
  201. - handle compressed man pages
  202. * Wed Jan 5 2000 Bill Nottingham <notting@redhat.com>
  203. - clean up spec file some
  204. * Wed Nov 24 1999 Tim Powers <timp@redhat.com>
  205. - came in on my day off to buld this package, feel special?
  206. - updated to 1.2.1
  207. * Mon Aug 30 1999 Tim Powers <timp@redhat.com>
  208. - changed group
  209. - changed buildroot toe be in /var/tmp
  210. - added %defattr
  211. * Tue Jul 21 1999 Tim Powers <timp@redhat.com>
  212. - rebuilt for 6.1
  213. * Fri Apr 23 1999 Michael K. Johnson <johnsonm@redhat.com>
  214. - PATH hack to protect "make install" from install-info
  215. - %doc path fixed
  216. - protect postun from uninstall
  217. - Moved $V outside of '' so that it gets interpolated
  218. * Thu Apr 22 1999 Owen Taylor <otaylor@redhat.com>
  219. - Upgrade to psgml-1.0.3
  220. - Made noarch