simple-hatena-mode-vl.spec 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. %define origver 0.15
  2. %define rel 2
  3. %define svn_rev 8462
  4. %define _noVersionedDependencies 1
  5. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  6. %define origname simple-hatena-mode
  7. Summary: Emacs interface to Hatena::Diary Writer
  8. Summary(ja): はてなダイアリーライターの Emacs インタフェース
  9. Name: %{origname}
  10. Version: %{origver}
  11. Release: %{rel}.svn%{svn_rev}%{?_dist_release}
  12. Source0: http://svn.coderepos.org/share/lang/elisp/simple-hatena-mode/trunk/simple-hatena-mode.el
  13. Source1: %{origname}-install.sh
  14. Source2: %{origname}-remove.sh
  15. Source3: vine-default-%{origname}.el
  16. Source4: %{origname}-init.el
  17. Source5: http://www.gnu.org/licenses/gpl-2.0.txt
  18. License: GPLv2+
  19. Group: Applications/Editors/Emacs
  20. URL: http://coderepos.org/share/wiki/SimpleHatenaMode
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. BuildArch: noarch
  23. Requires: emacsen
  24. PreReq: emacsen
  25. %prereq_ge emacsen-common
  26. Requires: hatena-diary-writer
  27. Requires: html-helper-mode
  28. Distribution: Vine Linux
  29. Vendor: Project Vine
  30. Packager: iwaim
  31. %description
  32. Emacs interface to Hatena::Diary Writer
  33. %description -l ja
  34. はてなダイアリーライターの Emacs インタフェース
  35. %prep
  36. %setup -q -T -c %{origname}-%{origver}
  37. %{__cp} -a %{SOURCE0} %{SOURCE5} .
  38. %install
  39. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  40. [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
  41. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  42. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  43. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  44. #
  45. # install el files
  46. #
  47. %{__cp} -p *.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  48. #
  49. # install script (bytecompile el and install elc , remove)
  50. #
  51. %_installemacsenscript %{origname} %{SOURCE1}
  52. %_removeemacsenscript %{origname} %{SOURCE2}
  53. %clean
  54. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  55. %post
  56. #
  57. # bytecompile and install
  58. #
  59. if [ "$1" = 2 ]; then
  60. %_emacsenPackageRemove %{origname}
  61. fi
  62. %_addemacsenlist %{origname}
  63. %_emacsenPackageInstall %{origname}
  64. %preun
  65. if [ "$1" = 0 ]; then
  66. %_emacsenPackageRemove %{origname}
  67. %_removeemacsenlist %{origname}
  68. fi
  69. %files
  70. %defattr(-,root,root)
  71. %doc gpl-2.0.txt
  72. %{_datadir}/emacs/site-lisp/%{origname}
  73. %{emacsen_pkgdir}/install/%{origname}
  74. %{emacsen_pkgdir}/remove/%{origname}
  75. %changelog
  76. * Sun Apr 17 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.15-2.svn8462
  77. - do not byte-compile simple-hatena-mode.el (simple-hatena-mode-install.sh)
  78. * Wed Apr 07 2010 IWAI, Masaharu <iwai@alib.jp> 0.15-1.svn8462
  79. - first release for Vine Linux