|
@@ -0,0 +1,118 @@
|
|
|
+%define _noVersionedDependencies 1
|
|
|
+%define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
|
|
|
+%define emacsen_pkgdir /usr/lib/emacsen-common/packages
|
|
|
+%define origname js2-mode
|
|
|
+%define origver 20090723b
|
|
|
+
|
|
|
+Summary: An improved JavaScript mode for GNU Emacs
|
|
|
+Name: %{origname}
|
|
|
+Version: %{origver}
|
|
|
+Release: 1%{?_dist_release}
|
|
|
+
|
|
|
+Source0: http://js2-mode.googlecode.com/files/js2-%{origver}.el
|
|
|
+Source1: %{origname}-install.sh
|
|
|
+Source2: %{origname}-remove.sh
|
|
|
+Source3: vine-default-%{origname}.el
|
|
|
+Source4: %{origname}-init.el
|
|
|
+
|
|
|
+License: GPLv2
|
|
|
+Group: Applications/Editors/Emacs
|
|
|
+URL: http://code.google.com/p/js2-mode/
|
|
|
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
+BuildArch: noarch
|
|
|
+
|
|
|
+Requires: emacsen
|
|
|
+PreReq: emacsen
|
|
|
+%prereq_ge emacsen-common
|
|
|
+
|
|
|
+Distribution: Vine Linux
|
|
|
+Vendor: Project Vine
|
|
|
+Packager: iwaim
|
|
|
+
|
|
|
+%description
|
|
|
+An improved JavaScript mode for GNU Emacs.
|
|
|
+
|
|
|
+Features:
|
|
|
+
|
|
|
+ * variable (adjustable) indentation
|
|
|
+ * accurate syntax highlighting
|
|
|
+ * highlighting of syntactic errors and many semantic errors
|
|
|
+ * strict-mode warning reporting (such as duplicate var declaration)
|
|
|
+ * smart line-wrapping in comments and strings
|
|
|
+ * typing helpers (e.g. matching quotes/brackets)
|
|
|
+ * code-folding (collapse element as {...})
|
|
|
+ * supports JavaScript 1.5, 1.6 (including E4X), 1.7 and 1.8
|
|
|
+ * customizable colors, or use font-lock defaults
|
|
|
+ * many customization options
|
|
|
+
|
|
|
+Note - this mode is for GNU Emacs, version 22 and higher. It does not support XEmacs.
|
|
|
+
|
|
|
+%prep
|
|
|
+
|
|
|
+%setup -q -T -c %{origname}-%{origver}
|
|
|
+
|
|
|
+%build
|
|
|
+
|
|
|
+%install
|
|
|
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
|
|
|
+[ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
|
|
|
+
|
|
|
+mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
|
|
|
+mkdir -p %{buildroot}%{emacsen_pkgdir}/install
|
|
|
+mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
|
|
|
+
|
|
|
+#
|
|
|
+# install el files
|
|
|
+#
|
|
|
+
|
|
|
+cp -p %{SOURCE0} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/js2.el
|
|
|
+cp -p %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
|
|
|
+
|
|
|
+
|
|
|
+#
|
|
|
+# install script (bytecompile el and install elc , remove)
|
|
|
+#
|
|
|
+
|
|
|
+%_installemacsenscript %{origname} %{SOURCE1}
|
|
|
+
|
|
|
+%_removeemacsenscript %{origname} %{SOURCE2}
|
|
|
+
|
|
|
+
|
|
|
+%clean
|
|
|
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
|
|
|
+
|
|
|
+%post
|
|
|
+#
|
|
|
+# bytecompile and install
|
|
|
+#
|
|
|
+if [ "$1" = 2 ]; then
|
|
|
+
|
|
|
+%_emacsenPackageRemove %{origname}
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+%_addemacsenlist %{origname}
|
|
|
+
|
|
|
+%_emacsenPackageInstall %{origname}
|
|
|
+
|
|
|
+
|
|
|
+%preun
|
|
|
+if [ "$1" = 0 ]; then
|
|
|
+
|
|
|
+%_emacsenPackageRemove %{origname}
|
|
|
+
|
|
|
+%_removeemacsenlist %{origname}
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+%files
|
|
|
+%defattr(-,root,root)
|
|
|
+%{_datadir}/emacs/site-lisp/%{origname}
|
|
|
+%{emacsen_pkgdir}/install/%{origname}
|
|
|
+%{emacsen_pkgdir}/remove/%{origname}
|
|
|
+
|
|
|
+%changelog
|
|
|
+* Sat Jan 16 2010 IWAI, Masaharu <iwai@alib.jp> 20090723b-1
|
|
|
+- first release for Vine Linux
|
|
|
+
|