lua-mode-vl.spec 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 20140514
  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: https://github.com/immerrr/lua-mode/archive/v%{version}.tar.gz
  11. Source1: %{origname}-install.sh
  12. Source2: %{origname}-remove.sh
  13. Source3: vine-default-%{origname}.el
  14. Source4: %{origname}-init.el
  15. License: GPLv2+
  16. Group: Applications/Editors/Emacs
  17. URL: http://immerrr.github.io/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
  33. #-c %{origname}-%{origver}
  34. %build
  35. %install
  36. [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
  37. [ "%{buildroot}" != "/" ] && %__mkdir_p %{buildroot}
  38. %__mkdir_p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  39. %__mkdir_p %{buildroot}%{emacsen_pkgdir}/install
  40. %__mkdir_p %{buildroot}%{emacsen_pkgdir}/remove
  41. #
  42. # install el files
  43. #
  44. %__cp -p *.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  45. #
  46. # install script (bytecompile el and install elc , remove)
  47. #
  48. %_installemacsenscript %{origname} %{SOURCE1}
  49. %_removeemacsenscript %{origname} %{SOURCE2}
  50. %clean
  51. [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
  52. %post
  53. #
  54. # bytecompile and install
  55. #
  56. if [ "$1" = 2 ]; then
  57. %_emacsenPackageRemove %{origname}
  58. fi
  59. %_addemacsenlist %{origname}
  60. %_emacsenPackageInstall %{origname}
  61. %preun
  62. if [ "$1" = 0 ]; then
  63. %_emacsenPackageRemove %{origname}
  64. %_removeemacsenlist %{origname}
  65. fi
  66. %files
  67. %defattr(-,root,root)
  68. %doc NEWS README README.md TODO
  69. %{_datadir}/emacs/site-lisp/%{origname}
  70. %{emacsen_pkgdir}/install/%{origname}
  71. %{emacsen_pkgdir}/remove/%{origname}
  72. %changelog
  73. * Fri Apr 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 20140514-1
  74. - new upstream release
  75. * Thu Apr 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> 20110324-1
  76. - first release for Vine Linux