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