[nodejs-tern: 1/2] Initial Commit
Gerard Ryan
galileo at fedoraproject.org
Wed Nov 26 20:15:41 UTC 2014
commit 5f5ed81a9d85d67a38eb5f0333e6b43ed524e476
Author: Gerard Ryan <gerard at ryan.lt>
Date: Sat Nov 22 21:11:01 2014 +0000
Initial Commit
nodejs-tern.spec | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
tern-init.el | 6 +++
3 files changed, 111 insertions(+), 0 deletions(-)
---
diff --git a/nodejs-tern.spec b/nodejs-tern.spec
new file mode 100644
index 0000000..2c15741
--- /dev/null
+++ b/nodejs-tern.spec
@@ -0,0 +1,104 @@
+%global shortname tern
+
+Name: nodejs-%{shortname}
+Version: 0.7.0
+Release: 5%{?dist}
+Summary: JavaScript code analyzer for deep, cross-editor language support
+
+License: MIT
+URL: http://ternjs.net/
+Source0: http://registry.npmjs.org/%{shortname}/-/%{shortname}-%{version}.tgz
+Source1: %{shortname}-init.el
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+BuildRequires: npm(acorn)
+BuildRequires: emacs
+BuildRequires: emacs-auto-complete
+
+Requires: emacs-filesystem >= %{_emacs_version}
+
+
+%description
+Tern is a stand-alone, editor-independent JavaScript analyzer that can be used
+to improve the JavaScript integration of existing editors.
+
+%prep
+%setup -qn package
+%nodejs_fixdep glob
+%nodejs_fixdep minimatch
+
+
+%build
+%{_emacs_bytecompile} emacs/tern.el
+%{_emacs_bytecompile} emacs/tern-auto-complete.el
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{shortname}/bin/
+
+cp -pr package.json bin/ lib/ plugin/ %{buildroot}%{nodejs_sitelib}/%{shortname}
+cp -pr bin/condense bin/from_ts bin/tern %{buildroot}%{nodejs_sitelib}/%{shortname}/bin/
+
+# Don't install this zero-length file
+rm %{buildroot}%{nodejs_sitelib}/%{shortname}/lib/jsdoc.js
+
+# Don't install this test file
+rm %{buildroot}%{nodejs_sitelib}/%{shortname}/bin/test
+
+# Install & symlink files from defs in _datadir
+mkdir -p %{buildroot}%{_datadir}/%{name}
+cp -pr defs/* %{buildroot}%{_datadir}/%{name}
+
+pushd %{buildroot}%{nodejs_sitelib}/%{shortname}/
+ ln -s %{_datadir}/%{name}/ defs
+popd
+
+# Symlink tern executable file to _bindir
+mkdir -p %{buildroot}%{_bindir}
+pushd %{buildroot}%{_bindir}
+ ln -s %{nodejs_sitelib}/%{shortname}/bin/%{shortname}
+popd
+
+# Install emacs files
+mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{shortname}
+cp -pr emacs/* %{buildroot}%{_emacs_sitelispdir}/%{shortname}
+
+mkdir %{buildroot}%{_emacs_sitestartdir}
+cp -pr %{SOURCE1} %{buildroot}%{_emacs_sitestartdir}/
+
+%nodejs_symlink_deps
+
+
+%check
+%nodejs_symlink_deps --check
+sh -c './bin/test'
+
+
+%files
+%{nodejs_sitelib}/%{shortname}
+%{_datadir}/%{name}
+%{_bindir}/%{shortname}
+%{_emacs_sitelispdir}/%{shortname}
+%{_emacs_sitestartdir}/%{shortname}-init.el
+%doc LICENSE README.md doc/ index.html
+
+
+%changelog
+* Wed Nov 26 2014 Gerard Ryan <gerard at ryan.lt> - 0.7.0-5
+- Package elisp source files also
+
+* Tue Nov 25 2014 Gerard Ryan <gerard at ryan.lt> - 0.7.0-4
+- Compile Elisp files per emacs guidelines
+
+* Mon Nov 24 2014 Gerard Ryan <gerard at ryan.lt> - 0.7.0-3
+- Install & symlink files from defs in _datadir
+- Symlink tern executable file to _bindir
+- Install emacs files
+
+* Sun Nov 23 2014 Gerard Ryan <gerard at ryan.lt> - 0.7.0-2
+- Add BR on npm(acorn) for tests
+
+* Sat Nov 22 2014 Gerard Ryan <gerard at ryan.lt> - 0.7.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..1cb6ab2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+163f2f8d94c7f260052e68d6c8e354dc tern-0.7.0.tgz
diff --git a/tern-init.el b/tern-init.el
new file mode 100644
index 0000000..fee6dbb
--- /dev/null
+++ b/tern-init.el
@@ -0,0 +1,6 @@
+;;; Set up tern mode for Emacs.
+;;;
+;;; This file is automatically loaded by emacs's site-start.el
+;;; when you start a new emacs session.
+
+(autoload 'tern-mode "tern.el" nil t)
More information about the scm-commits
mailing list