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