js2-mode-vl.spec 2.9 KB

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