js2-mode-vl.spec 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(pre):%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define emacsen_pkgdir /usr/lib/emacsen-common/packages
  4. %define origname js2-mode
  5. %define origver 20141118
  6. Summary: An improved JavaScript mode for GNU Emacs
  7. Name: %{origname}
  8. Version: %{origver}
  9. Release: 1%{?_dist_release}
  10. Source0: https://github.com/mooz/%{name}/archive/%{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: GPLv3+
  16. Group: Applications/Editors/Emacs
  17. URL: http://code.google.com/p/js2-mode/
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. BuildArch: noarch
  20. Requires(pre): emacsen
  21. %prereq_ge emacsen-common
  22. Distribution: Vine Linux
  23. Vendor: Project Vine
  24. Packager: iwaim
  25. %description
  26. An improved JavaScript mode for GNU Emacs.
  27. Features:
  28. * variable (adjustable) indentation
  29. * accurate syntax highlighting
  30. * highlighting of syntactic errors and many semantic errors
  31. * strict-mode warning reporting (such as duplicate var declaration)
  32. * smart line-wrapping in comments and strings
  33. * typing helpers (e.g. matching quotes/brackets)
  34. * code-folding (collapse element as {...})
  35. * supports JavaScript 1.5, 1.6 (including E4X), 1.7 and 1.8
  36. * customizable colors, or use font-lock defaults
  37. * many customization options
  38. Note - this mode is for GNU Emacs, version 22 and higher. It does not support XEmacs.
  39. %prep
  40. %setup -q
  41. %build
  42. %install
  43. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  44. [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
  45. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  46. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  47. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  48. #
  49. # install el files
  50. #
  51. cp -p js2*.el %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/
  52. cp -p %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  53. #
  54. # install script (bytecompile el and install elc , remove)
  55. #
  56. %_installemacsenscript %{origname} %{SOURCE1}
  57. %_removeemacsenscript %{origname} %{SOURCE2}
  58. %clean
  59. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  60. %post
  61. #
  62. # bytecompile and install
  63. #
  64. if [ "$1" = 2 ]; then
  65. %_emacsenPackageRemove %{origname}
  66. fi
  67. %_addemacsenlist %{origname}
  68. %_emacsenPackageInstall %{origname}
  69. %preun
  70. if [ "$1" = 0 ]; then
  71. %_emacsenPackageRemove %{origname}
  72. %_removeemacsenlist %{origname}
  73. fi
  74. %files
  75. %defattr(-,root,root)
  76. %doc LICENSE README.md
  77. %{_datadir}/emacs/site-lisp/%{origname}
  78. %{emacsen_pkgdir}/install/%{origname}
  79. %{emacsen_pkgdir}/remove/%{origname}
  80. %changelog
  81. * Fri Apr 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 20141118-1
  82. - new upstream release
  83. - updated Source1
  84. * Wed Mar 10 2010 IWAI, Masaharu <iwai@alib.jp> 20090723b-2
  85. - correct output message on js2-mode-install.sh (SOURCE1)
  86. * Sat Jan 16 2010 IWAI, Masaharu <iwai@alib.jp> 20090723b-1
  87. - first release for Vine Linux