source: projects/specs/branches/6/j/js2-mode/js2-mode-vl.spec @ 742

Revision 742, 2.9 KB checked in by iwaim, 14 years ago (diff)

update: js2-mode 20090723b-2

Line 
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
7Summary:      An improved JavaScript mode for GNU Emacs
8Name:         %{origname}
9Version:      %{origver}
10Release:      2%{?_dist_release}
11
12Source0:      http://js2-mode.googlecode.com/files/js2-%{origver}.el
13Source1:      %{origname}-install.sh
14Source2:      %{origname}-remove.sh
15Source3:      vine-default-%{origname}.el
16Source4:      %{origname}-init.el
17
18License:      GPLv2
19Group:        Applications/Editors/Emacs
20URL:          http://code.google.com/p/js2-mode/
21BuildRoot:    %{_tmppath}/%{name}-%{version}-root
22BuildArch:    noarch
23
24Requires:     emacsen
25PreReq:       emacsen
26%prereq_ge    emacsen-common
27
28Distribution: Vine Linux
29Vendor:       Project Vine
30Packager:     iwaim
31
32%description
33An improved JavaScript mode for GNU Emacs.
34
35Features:
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
48Note - 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
60mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
61mkdir -p %{buildroot}%{emacsen_pkgdir}/install
62mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
63
64#
65# install el files
66#
67
68cp -p %{SOURCE0} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/js2.el
69cp -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#
88if [ "$1" = 2 ]; then
89
90%_emacsenPackageRemove %{origname}
91
92fi
93
94%_addemacsenlist %{origname}
95
96%_emacsenPackageInstall %{origname}
97
98
99%preun
100if [ "$1" = 0 ]; then
101
102%_emacsenPackageRemove %{origname}
103
104%_removeemacsenlist %{origname}
105
106fi
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
116* Wed Mar 10 2010 IWAI, Masaharu <iwai@alib.jp> 20090723b-2
117- correct output message on js2-mode-install.sh (SOURCE1)
118
119* Sat Jan 16 2010 IWAI, Masaharu <iwai@alib.jp> 20090723b-1
120- first release for Vine Linux
121
Note: See TracBrowser for help on using the repository browser.