lookup-vl.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define emacsen_pkgdir /usr/lib/emacsen-common/packages
  4. %define origname lookup
  5. %define origver 1.4.1
  6. Summary: a Search Interface for Emacsen
  7. Summary(ja): Emacs 系のエディタで利用できる辞書検索インターフェース
  8. Name: %{origname}
  9. Version: %{origver}
  10. Release: 2%{?_dist_release}
  11. Source0: http://openlab.jp/edict/lookup/dist/lookup-%{version}.tar.gz
  12. Source1: %{origname}-install.sh
  13. Source2: %{origname}-remove.sh
  14. Source10: lookup-sample.dotemacs
  15. Source11: lookup-init.el
  16. Source12: vine-default-lookup.el
  17. Patch0: lookup-1.4.1-void-e.patch
  18. License: GPLv2+
  19. Group: Applications/Editors/Emacs
  20. URL: http://openlab.jp/edict/lookup/
  21. BuildRoot: %{_tmppath}/%{name}-%{version}
  22. BuildArch: noarch
  23. Requires: emacsen flim apel
  24. BuildRequires: flim apel
  25. %prereq_ge emacsen-common
  26. Requires: /sbin/install-info
  27. Obsoletes: lookup-emacs, lookup-xemacs
  28. Conflicts: %{origname}-el
  29. Distribution: Vine Linux
  30. Vendor: Project Vine
  31. Packager: Tomoya TAKA <taka@vinelinux.org>
  32. %description
  33. Lookup is interface on Emacs to use some dictionaries.
  34. Lookup is developed by OpenLab, Ring Server Project.
  35. %description -l ja
  36. Lookup は Emacs 系のエディタで利用できる辞書検索インターフェースです。
  37. 市販のCD-ROM 辞書やネットワークの辞書サーバを始め、様々な情報源から簡単な操作
  38. と設定で辞書検索が行なえます。
  39. %prep
  40. %setup -q -n %{origname}-%{origver}
  41. %patch0 -p 1
  42. %build
  43. %configure --prefix=%{_prefix} --infodir=%{_infodir}
  44. %install
  45. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  46. [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
  47. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  48. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  49. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  50. #
  51. # install el files
  52. #
  53. cp -p lisp/*.el %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  54. cp -p lisp/*.el.in %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  55. cp -p lisp/lookup-logo.* %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  56. cp -p packages/*.el %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  57. cp -p packages/dict-misc/*.el %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  58. cp -p packages/jitenban97/*.el %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  59. cp %{SOURCE11} %{SOURCE12} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/
  60. #
  61. # install script (bytecompile el and install elc , remove)
  62. #
  63. %_installemacsenscript %{origname} %{SOURCE1}
  64. %_removeemacsenscript %{origname} %{SOURCE2}
  65. #
  66. # install info file
  67. #
  68. mkdir -p %{buildroot}%{_infodir}
  69. cp -p texi/lookup-guide.info %{buildroot}%{_infodir}
  70. cp -p texi/lookup.info* %{buildroot}%{_infodir}
  71. #
  72. # copy sample of ~/{.emacs.el,.xemacs.el}
  73. #
  74. cp %{SOURCE10} ./sample.dotemacs
  75. %clean
  76. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  77. %post
  78. #
  79. # bytecompile and install
  80. #
  81. if [ "$1" = 2 ]; then
  82. %_emacsenPackageRemove %{origname}
  83. fi
  84. %_addemacsenlist %{origname}
  85. %_emacsenPackageInstall %{origname}
  86. /sbin/install-info --info-dir=%{_infodir} %{_infodir}/lookup-guide.info.gz
  87. /sbin/install-info --info-dir=%{_infodir} %{_infodir}/lookup.info.gz
  88. %preun
  89. if [ "$1" = 0 ]; then
  90. %_emacsenPackageRemove %{origname}
  91. %_removeemacsenlist %{origname}
  92. /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/lookup-guide.info.gz
  93. /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/lookup.info.gz
  94. fi
  95. %files
  96. %defattr(-,root,root)
  97. %doc AUTHORS COPYING ChangeLog NEWS README VERSION
  98. %doc sample.dotemacs texi/*.texi
  99. %{_datadir}/emacs/site-lisp/%{origname}
  100. %{emacsen_pkgdir}/install/%{origname}
  101. %{emacsen_pkgdir}/remove/%{origname}
  102. %{_infodir}/*
  103. %changelog
  104. * Tue Jan 15 2013 IWAI, Masaharu <iwai@alib.jp> 1.4.1-2
  105. - add fix Symbol's value as variable is void patch (Patch0) for Emacs24
  106. - update License tag: GPL -> GPLv2+
  107. - replace PreReq to Requires: prereq is deprecated
  108. * Tue Mar 30 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.1-1
  109. - update to 1.4.1
  110. - add PreReq: apel
  111. - add BuildRequires: flim apel
  112. * Mon Dec 14 2009 IWAI, Masaharu <iwai@alib.jp> 1.4-2
  113. - apply vine-default
  114. - add lookup-init.el (Source11)
  115. - add vine-default-lookup.el (Source12)
  116. - update lookup-{install,remove}.sh
  117. - update sammary and description in English
  118. - rename Source10: sample.dotemacs to lookup-sample.dotemacs
  119. - add PreReq: flim :fixed <BTS:VineLinux:857>
  120. * Fri Oct 03 2008 Shu KONNO <owa@bg.wakwak.com> 1.4-1vl5
  121. - applied new versioning policy, spec in utf-8
  122. - added %%emacsen_pkgdir macro
  123. * Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4-0vl3
  124. - changed Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  125. - s/Copyright/License/
  126. * Fri Jul 2 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 1.4-0vl2
  127. - add missing SOURCES (ndeb-binary.el, ndnmz.el) in lookup-install.sh
  128. * Tue May 4 2004 IWAI, Masaharu <iwai@alib.jp> 1.4-0vl1
  129. - version up to 1.4 ( edict openlab version )
  130. - update URL and Source0 tags
  131. - update lookup-install.sh script: value of VERSION
  132. * Mon Mar 17 2003 IWAI Masaharu <iwai@alib.jp> 1.3-0vl4
  133. - rebuild
  134. * Sun Dec 30 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.3-0vl3
  135. - lookup-el -> lookup again
  136. * Sat Dec 9 2001 Tomoya TAKA <taka@vinelinux.org> 1.3-0vl1
  137. - emacsenize
  138. * Sun Jun 24 2001 Tomoya TAKA <tomoya@olive.plala.or.jp>
  139. - 1.3-0vl1
  140. - add Prereq: /sbin/install-info, handle info pages in %%post and %%preun
  141. - some fix on spec file, use rpm macros
  142. * Mon Jun 26 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  143. - 1.2-0vl3
  144. - BuildArch: noarch
  145. * Wed Apr 26 2000 Masaki Kawamura <kawamura@ic.sci.yamaguchi-u.ac.jp>
  146. - release for the Vine Linux 2.0