lua-mode-vl.spec 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(post):%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define origname lua-mode
  4. %define origver 20110324
  5. Summary: Emacs major mode for editing Lua code
  6. Summary(ja): Lua コード編集用 Emacs メジャーモード
  7. Name: %{origname}
  8. Version: %{origver}
  9. Release: 1%{?_dist_release}
  10. Source0: lua-mode-%{version}.zip
  11. Source1: %{origname}-install.sh
  12. Source2: %{origname}-remove.sh
  13. Source3: vine-default-%{origname}.el
  14. Source4: %{origname}-init.el
  15. License: GPL
  16. Group: Applications/Editors/Emacs
  17. URL: http://luaforge.net/projects/lua-mode/
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. BuildArch: noarch
  20. BuildRequires: unzip
  21. Requires: emacsen
  22. Requires(post): emacsen
  23. %prereq_ge emacsen-common
  24. Distribution: Vine Linux
  25. Vendor: Project Vine
  26. Packager: munepi
  27. %description
  28. lua-mode is an Emacs major mode for editing Lua files.
  29. %description -l ja
  30. lua-mode は Lua ファイルを編集するための Emacs メジャーモードです。
  31. %prep
  32. %setup -q -c %{origname}-%{origver}
  33. %build
  34. %install
  35. [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
  36. [ "%{buildroot}" != "/" ] && %__mkdir_p %{buildroot}
  37. %__mkdir_p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  38. %__mkdir_p %{buildroot}%{emacsen_pkgdir}/install
  39. %__mkdir_p %{buildroot}%{emacsen_pkgdir}/remove
  40. #
  41. # install el files
  42. #
  43. %__cp -p *.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  44. #
  45. # install script (bytecompile el and install elc , remove)
  46. #
  47. %_installemacsenscript %{origname} %{SOURCE1}
  48. %_removeemacsenscript %{origname} %{SOURCE2}
  49. %clean
  50. [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
  51. %post
  52. #
  53. # bytecompile and install
  54. #
  55. if [ "$1" = 2 ]; then
  56. %_emacsenPackageRemove %{origname}
  57. fi
  58. %_addemacsenlist %{origname}
  59. %_emacsenPackageInstall %{origname}
  60. %preun
  61. if [ "$1" = 0 ]; then
  62. %_emacsenPackageRemove %{origname}
  63. %_removeemacsenlist %{origname}
  64. fi
  65. %files
  66. %defattr(-,root,root)
  67. %doc README README.md TODO
  68. %{_datadir}/emacs/site-lisp/%{origname}
  69. %{emacsen_pkgdir}/install/%{origname}
  70. %{emacsen_pkgdir}/remove/%{origname}
  71. %changelog
  72. * Thu Apr 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> 20110324-1
  73. - first release for Vine Linux