text-translator-vl.spec 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 text-translator
  5. %define origver 0.7.1
  6. Summary: translates the character string on Emacs
  7. Name: %{origname}
  8. Version: %{origver}
  9. Release: 1%{?_dist_release}
  10. Source0: text-translator.el
  11. Source1: text-translator-vars.el
  12. Source2: text-translator-load.el
  13. Source3: http://www.gnu.org/licenses/gpl-2.0.txt
  14. Source11: %{origname}-install.sh
  15. Source12: %{origname}-remove.sh
  16. Source13: vine-default-%{origname}.el
  17. Source14: %{origname}-init.el
  18. License: GPLv2+
  19. Group: Applications/Editors/Emacs
  20. URL: http://www.emacswiki.org/emacs/TextTranslator
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. BuildArch: noarch
  23. Requires: emacsen
  24. PreReq: emacsen
  25. %prereq_ge emacsen-common
  26. Distribution: Vine Linux
  27. Vendor: Project Vine
  28. Packager: iwaim
  29. %description
  30. translates the character string on Emacs. this packages use the text
  31. translation service that exists on the Internet.
  32. %prep
  33. %setup -T -c %{origname}-%{origver}
  34. %{__cp} %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} .
  35. %build
  36. %install
  37. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  38. [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
  39. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  40. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  41. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  42. #
  43. # install el files
  44. #
  45. cp -p *.el %{SOURCE13} %{SOURCE14} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  46. #
  47. # install script (bytecompile el and install elc , remove)
  48. #
  49. %_installemacsenscript %{origname} %{SOURCE11}
  50. %_removeemacsenscript %{origname} %{SOURCE12}
  51. %clean
  52. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  53. %post
  54. #
  55. # bytecompile and install
  56. #
  57. if [ "$1" = 2 ]; then
  58. %_emacsenPackageRemove %{origname}
  59. fi
  60. %_addemacsenlist %{origname}
  61. %_emacsenPackageInstall %{origname}
  62. %preun
  63. if [ "$1" = 0 ]; then
  64. %_emacsenPackageRemove %{origname}
  65. %_removeemacsenlist %{origname}
  66. fi
  67. %files
  68. %defattr(-,root,root)
  69. %doc gpl-2.0.txt
  70. %{_datadir}/emacs/site-lisp/%{origname}
  71. %{emacsen_pkgdir}/install/%{origname}
  72. %{emacsen_pkgdir}/remove/%{origname}
  73. %changelog
  74. * Sun Mar 07 2010 IWAI, Masaharu <iwai@alib.jp> 0.7.1-1
  75. - first release for Vine Linux