[nodejs-backbone] initial version
Dan Callaghan
dcallagh at fedoraproject.org
Mon Nov 24 23:47:54 UTC 2014
commit 521bff72346fae0151a0da068d7fbe3ec3b27015
Author: Dan Callaghan <dcallagh at redhat.com>
Date: Sun Oct 12 12:09:57 2014 +1000
initial version
.gitignore | 2 +
nodejs-backbone.spec | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +
3 files changed, 81 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ba684cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/backbone-1.1.2.tgz
+/tests-1.1.2.tar.bz2
diff --git a/nodejs-backbone.spec b/nodejs-backbone.spec
new file mode 100644
index 0000000..d7daa3b
--- /dev/null
+++ b/nodejs-backbone.spec
@@ -0,0 +1,77 @@
+%global modname backbone
+
+%if ! ( 0%{?fedora} || 0%{?rhel} >= 7 )
+%{?nodejs_find_provides_and_requires}
+%global nodejs_arches %{ix86} x86_64 %{arm}
+%endif
+
+# tests are disabled for now (need QUnit, runs in PhantomJS?)
+%bcond_with tests
+
+Name: nodejs-%{modname}
+Version: 1.1.2
+Release: 1%{?dist}
+Summary: Models, Views, Collections, and Events for JavaScript applications
+License: MIT
+URL: http://backbonejs.org/
+Source0: http://registry.npmjs.org/%{modname}/-/%{modname}-%{version}.tgz
+# git archive --format=tar --prefix=test/ 1.1.2:test/ | bzip2 >tests-1.1.2.tar.bz2
+Source1: tests-%{version}.tar.bz2
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+BuildRequires: nodejs-packaging
+BuildRequires: web-assets-devel
+BuildRequires: uglify-js
+Requires: js-%{modname} = %{version}-%{release}
+%if %{with tests}
+BuildRequires: nodejs
+BuildRequires: nodejs-qunit
+%endif
+
+%description
+Backbone supplies structure to JavaScript-heavy applications by providing
+models key-value binding and custom events, collections with a rich API of
+enumerable functions, views with declarative event handling, and connects it
+all to your existing application over a RESTful JSON interface.
+
+%package -n js-%{modname}
+Summary: Models, Views, Collections and Events for JavaScript applications
+Requires: web-assets-filesystem
+
+%description -n js-%{modname}
+Backbone supplies structure to JavaScript-heavy applications by providing
+models key-value binding and custom events, collections with a rich API of
+enumerable functions, views with declarative event handling, and connects it
+all to your existing application over a RESTful JSON interface.
+
+%prep
+%setup -q -n package
+%setup -q -T -D -a 1 -n package
+rm backbone-min.{js,map}
+
+%build
+uglifyjs backbone.js -m --source-map backbone-min.map -o backbone-min.js
+
+%if %{with tests}
+%check
+%nodejs_symlink_deps --check
+# ?
+%endif
+
+%install
+mkdir -p %{buildroot}%{_jsdir}/%{modname}
+cp -p backbone.js backbone-min.js backbone-min.map %{buildroot}%{_jsdir}/%{modname}/
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{modname}
+cp -p backbone.js package.json %{buildroot}%{nodejs_sitelib}/%{modname}/
+%nodejs_symlink_deps
+
+%files
+%{nodejs_sitelib}/%{modname}
+
+%files -n js-%{modname}
+%doc README.md LICENSE
+%{_jsdir}/%{modname}
+
+%changelog
+* Sun Oct 12 2014 Dan Callaghan <dcallagh at redhat.com> - 1.1.2-1
+- initial version
diff --git a/sources b/sources
index e69de29..7b47636 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+fd9f61eb65df4afdb18a566c93f51f27 backbone-1.1.2.tgz
+86778ef97977f9cc4aeae4fded320284 tests-1.1.2.tar.bz2
More information about the scm-commits
mailing list