Blame nodejs-arr-flatten.spec
|
Jared K. Smith |
713892b |
%{?nodejs_find_provides_and_requires}
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%global packagename arr-flatten
|
|
Jared K. Smith |
713892b |
%global enable_tests 1
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
Name: nodejs-arr-flatten
|
|
Jared K. Smith |
713892b |
Version: 1.0.1
|
|
Jared K. Smith |
713892b |
Release: 1%{?dist}
|
|
Jared K. Smith |
713892b |
Summary: Recursively flatten an array or arrays
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
License: MIT
|
|
Jared K. Smith |
713892b |
URL: https://github.com/jonschlinkert/arr-flatten.git
|
|
Jared K. Smith |
713892b |
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
Jared K. Smith |
713892b |
# The test files are not included in the npm tarball, and the 1.0.1 release has
|
|
Jared K. Smith |
713892b |
# not yet been tagged in github, so pull from master for now
|
|
Jared K. Smith |
713892b |
Source1: https://raw.githubusercontent.com/jonschlinkert/arr-flatten/master/test.js
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
BuildArch: noarch
|
|
Jared K. Smith |
713892b |
%if 0%{?fedora} >= 19
|
|
Jared K. Smith |
713892b |
ExclusiveArch: %{nodejs_arches} noarch
|
|
Jared K. Smith |
713892b |
%else
|
|
Jared K. Smith |
713892b |
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
Jared K. Smith |
713892b |
%endif
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
BuildRequires: nodejs-packaging
|
|
Jared K. Smith |
713892b |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
713892b |
BuildRequires: mocha
|
|
Jared K. Smith |
713892b |
BuildRequires: npm(array-flatten)
|
|
Jared K. Smith |
713892b |
%endif
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%description
|
|
Jared K. Smith |
713892b |
Recursively flatten an array or arrays. This is the fastest implementation of
|
|
Jared K. Smith |
713892b |
array flatten.
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%prep
|
|
Jared K. Smith |
713892b |
%setup -q -n package
|
|
Jared K. Smith |
713892b |
# setup the tests
|
|
Jared K. Smith |
713892b |
cp -p %{SOURCE1} .
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
# remove unneeded executable bits
|
|
Jared K. Smith |
713892b |
chmod -x ./*
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%build
|
|
Jared K. Smith |
713892b |
# nothing to do!
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%install
|
|
Jared K. Smith |
713892b |
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
713892b |
cp -pr package.json index.js \
|
|
Jared K. Smith |
713892b |
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%nodejs_symlink_deps
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%check
|
|
Jared K. Smith |
713892b |
%nodejs_symlink_deps --check
|
|
Jared K. Smith |
713892b |
%{__nodejs} -e 'require("./")'
|
|
Jared K. Smith |
713892b |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
713892b |
%{_bindir}/mocha -R spec
|
|
Jared K. Smith |
713892b |
%else
|
|
Jared K. Smith |
713892b |
%{_bindir}/echo "Tests disabled..."
|
|
Jared K. Smith |
713892b |
%endif
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%files
|
|
Jared K. Smith |
713892b |
%{!?_licensedir:%global license %doc}
|
|
Jared K. Smith |
713892b |
%doc *.md
|
|
Jared K. Smith |
713892b |
%license LICENSE
|
|
Jared K. Smith |
713892b |
%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
|
|
Jared K. Smith |
713892b |
%changelog
|
|
Jared K. Smith |
713892b |
* Wed Feb 3 2016 Jared Smith <jsmith@fedoraproject.org> - 1.0.1-1
|
|
Jared K. Smith |
713892b |
- Initial packaging
|