parent
8e5cfc056b
commit
0ebf3c06c4
@ -0,0 +1,2 @@
|
||||
/tests-1.4.4.tar.bz2
|
||||
/underscore-1.4.4.tgz
|
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
tag=1.4.4
|
||||
|
||||
set -e
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
|
||||
trap cleanup EXIT
|
||||
cleanup() {
|
||||
set +e
|
||||
[ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
|
||||
}
|
||||
|
||||
unset CDPATH
|
||||
pwd=$(pwd)
|
||||
|
||||
pushd "$tmp"
|
||||
git clone git://github.com/documentcloud/underscore.git
|
||||
cd underscore
|
||||
git archive --prefix="test/" --format=tar tags/${tag}:test/ \
|
||||
| bzip2 > "$pwd"/tests-${tag}.tar.bz2
|
||||
popd
|
@ -0,0 +1,63 @@
|
||||
%global enable_tests 0
|
||||
|
||||
Name: nodejs-underscore
|
||||
Version: 1.4.4
|
||||
Release: 1%{?dist}
|
||||
Summary: JavaScript's functional programming helper library
|
||||
License: MIT
|
||||
Group: System Environment/Libraries
|
||||
URL: https://github.com/documentcloud/underscore
|
||||
Source0: http://registry.npmjs.org/underscore/-/underscore-%{version}.tgz
|
||||
# The test files are not included in the npm tarball.
|
||||
# Source1 is generated by running Source10, which pulls from the upstream
|
||||
# version control repository.
|
||||
Source1: tests-%{version}.tar.bz2
|
||||
Source10: dl-tests.sh
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: nodejs-devel
|
||||
|
||||
%if 0%{?enable_tests}
|
||||
BuildRequires: npm(phantomjs)
|
||||
%endif
|
||||
|
||||
%description
|
||||
Underscore.js is a utility-belt library for JavaScript that provides support
|
||||
for the usual functional suspects (each, map, reduce, filter...) without
|
||||
extending any core JavaScript objects.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n package
|
||||
%setup -T -D -a 1 -q -n package
|
||||
|
||||
|
||||
%build
|
||||
#nothing to do
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/underscore
|
||||
cp -pr package.json index.js underscore.js underscore-min.js \
|
||||
%{buildroot}%{nodejs_sitelib}/underscore
|
||||
|
||||
# No dependencies.
|
||||
# %%nodejs_symlink_deps
|
||||
|
||||
|
||||
%if 0%{?enable_tests}
|
||||
%check
|
||||
cp -pr %{nodejs_sitelib} .
|
||||
%{nodejs_sitelib}/phantomjs/bin/phantomjs \
|
||||
test/vendor/runner.js test/index.html?noglobals=true
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%doc CONTRIBUTING.md LICENSE README.md favicon.ico index.html
|
||||
%{nodejs_sitelib}/underscore
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 13 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.4.4-1
|
||||
- initial package
|
Loading…
Reference in new issue