suikyo-vl.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define name suikyo
  4. %define version 2.1.0
  5. %define release 1%{?_dist_release}
  6. Summary: A Romaji-Kana conversion Library
  7. Summary(ja): ローマ字・かな変換ライブラリ
  8. Name: %{name}
  9. Version: %{version}
  10. Release: %{release}
  11. Group: Development/Libraries
  12. License: GPL
  13. URL: http://taiyaki.org/suikyo/
  14. Source0: %{name}-%{version}.tar.bz2
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  16. Requires: ruby
  17. BuildRequires: ruby-devel
  18. ### for GNU Emacs on Vine Linux
  19. Source100: %{name}-install.sh
  20. Source101: %{name}-remove.sh
  21. ##Source102: %{name}-init.el
  22. %description
  23. Suikyo is Romaji-Kana conversion Library.
  24. %description -l ja
  25. 水鏡はローマ字・かな変換ライブラリです.
  26. %package el
  27. Summary: elisp binding of Suikyo
  28. Summary(ja): 水鏡の elisp バイディング
  29. Group: Applications/Editors/Emacs
  30. PreReq: emacsen
  31. Requires: %{name} = %{version}-%{release}
  32. %prereq_ge emacsen-common
  33. BuildRequires: emacsen-common
  34. BuildArch: noarch
  35. %description el
  36. Suikyo is Romaji-Kana conversion Library.
  37. This package contains elisp binding of Suikyo.
  38. %description -l ja el
  39. 水鏡はローマ字・かな変換ライブラリです.
  40. このパッケージは水鏡の elisp バイディングを含んでいます.
  41. %prep
  42. %setup -q
  43. %build
  44. [[ ! -x configure ]] && ./autogen.sh
  45. %configure --with-rubydir=%{rlibdir}
  46. %{__make}
  47. %check
  48. %{__make} check
  49. %install
  50. rm -rf $RPM_BUILD_ROOT
  51. %{__make} install DESTDIR=${RPM_BUILD_ROOT} sitelibdir=%{rlibdir}
  52. rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
  53. ### for GNU Emacs
  54. mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name}
  55. mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/emacsen-common/packages/install
  56. mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/emacsen-common/packages/remove
  57. mkdir -p ${RPM_BUILD_ROOT}%{_infodir}
  58. #
  59. # install el files
  60. #
  61. ##%{__install} -m 644 %{SOURCE102} \
  62. ## ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/
  63. %{__cat} > \
  64. ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{name}-init.el <<EOF
  65. ;;
  66. ;; suikyo-init.el
  67. ;;
  68. ;; for Vine Linux with emacsen-common
  69. ;; Munehiro Yamamoto <munepi@cg8.so-net.ne.jp>
  70. (defconst suikyo-version '("2.1.0" "2005-03-29"))
  71. (provide 'init-suikyo)
  72. ;; end of file
  73. EOF
  74. ##%{__cat} ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/init-suikyo.el >> \
  75. ## ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{name}-init.el
  76. %{__rm} -f ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/init-suikyo.el
  77. ##%{__cat} >> \
  78. ## ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{name}-init.el <<EOF
  79. ##
  80. ##;; end of file
  81. ##EOF
  82. #
  83. # install script (bytecompile el and install elc, remove)
  84. #
  85. %_installemacsenscript %{name} %{SOURCE100}
  86. %_removeemacsenscript %{name} %{SOURCE101}
  87. %clean
  88. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  89. %post -n %{name}-el
  90. #
  91. # bytecompile and install
  92. #
  93. if [ "$1" = 2 ] ; then
  94. %_emacsenPackageRemove %{name}
  95. fi
  96. %_addemacsenlist %{name}
  97. %_emacsenPackageInstall %{name}
  98. %preun -n %{name}-el
  99. if [ "$1" = 0 ]; then
  100. %_emacsenPackageRemove %{name}
  101. %_removeemacsenlist %{name}
  102. fi
  103. %files
  104. %defattr(-,root,root)
  105. %doc AUTHORS COPYING ChangeLog README
  106. %{rlibdir}/*
  107. %{_libdir}/pkgconfig/*
  108. %{_datadir}/%{name}
  109. %files -n %{name}-el
  110. %defattr(-,root,root)
  111. %doc AUTHORS COPYING ChangeLog README
  112. %{_datadir}/emacs/site-lisp/%{name}/
  113. %{_libdir}/emacsen-common/packages/install/%{name}
  114. %{_libdir}/emacsen-common/packages/remove/%{name}
  115. %changelog
  116. * Sat Nov 01 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.1.0-1
  117. - initial build for VineSeed
  118. * Mon Mar 24 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.1.0-1vl5
  119. - initial build for VineSeed
  120. ### end of file