Blame nodejs-array-unique.spec

Jared K. Smith 14e81a0
%{?nodejs_find_provides_and_requires}
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%global packagename array-unique
Jared K. Smith 14e81a0
%global enable_tests 1
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
Name:		nodejs-array-unique
Jared K. Smith e94dfd3
Version:	0.3.2
Jared K. Smith e94dfd3
Release:	1%{?dist}
Jared K. Smith 14e81a0
Summary:	Return an array free of duplicate values
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
License:	MIT
Jared K. Smith 14e81a0
URL:		https://github.com/jonschlinkert/array-unique.git
Jared K. Smith 14e81a0
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith 14e81a0
# The test files are not included in the npm tarball, and releases aren't
Jared K. Smith 14e81a0
# tagged in github, so we'll just pull from master for now
Jared K. Smith 14e81a0
Source1:	https://raw.githubusercontent.com/jonschlinkert/array-unique/master/test.js
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
BuildArch:	noarch
Jared K. Smith 14e81a0
%if 0%{?fedora} >= 19
Jared K. Smith 14e81a0
ExclusiveArch: %{nodejs_arches} noarch
Jared K. Smith 14e81a0
%else
Jared K. Smith 14e81a0
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Jared K. Smith 14e81a0
%endif
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
BuildRequires:	nodejs-packaging
Jared K. Smith 14e81a0
%if 0%{?enable_tests}
Jared K. Smith 14e81a0
BuildRequires:	mocha
Jared K. Smith 14e81a0
BuildRequires:	npm(should)
Jared K. Smith 14e81a0
%endif
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%description
Jared K. Smith 14e81a0
Return an array free of duplicate values. Fastest ES5 implementation.
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%prep
Jared K. Smith 14e81a0
%setup -q -n package
Jared K. Smith 14e81a0
# setup the tests
Jared K. Smith 14e81a0
cp -p %{SOURCE1} .
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
chmod -x ./*
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%build
Jared K. Smith 14e81a0
# nothing to do!
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%install
Jared K. Smith 14e81a0
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 14e81a0
cp -pr package.json index.js \
Jared K. Smith 14e81a0
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%nodejs_symlink_deps
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%check
Jared K. Smith 14e81a0
%nodejs_symlink_deps --check
Jared K. Smith 14e81a0
%{__nodejs} -e 'require("./")'
Jared K. Smith 14e81a0
%if 0%{?enable_tests}
Jared K. Smith 14e81a0
%{_bindir}/mocha -R spec
Jared K. Smith 14e81a0
%else
Jared K. Smith 14e81a0
%{_bindir}/echo "Tests disabled..."
Jared K. Smith 14e81a0
%endif
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%files
Jared K. Smith 14e81a0
%{!?_licensedir:%global license %doc}
Jared K. Smith 14e81a0
%doc *.md
Jared K. Smith 14e81a0
%license LICENSE
Jared K. Smith 14e81a0
%{nodejs_sitelib}/%{packagename}
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
Jared K. Smith 14e81a0
%changelog
Jared K. Smith e94dfd3
* Mon Apr 17 2017 Jared Smith <jsmith@fedoraproject.org> - 0.3.2-1
Jared K. Smith e94dfd3
- Update to upstream 0.3.2 release
Jared K. Smith e94dfd3
94111a1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-2
94111a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
94111a1
Jared K. Smith 14e81a0
* Wed Feb  3 2016 Jared Smith <jsmith@fedoraproject.org> - 0.2.1-1
Jared K. Smith 14e81a0
- Initial packaging