Blame nodejs-is-glob.spec

Jared K. Smith 9298fe4
%{?nodejs_find_provides_and_requires}
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%global packagename is-glob
Jared K. Smith 9298fe4
%global enable_tests 1
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
Name:		nodejs-is-glob
Jared K. Smith 04d6b88
Version:	4.0.0
0b32e5a
Release:	2%{?dist}
Jared K. Smith 9298fe4
Summary:	Returns `true` if the given string looks like a glob pattern
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
License:	MIT
Jared K. Smith 9298fe4
URL:		https://github.com/jonschlinkert/is-glob.git
Jared K. Smith 9298fe4
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith 9298fe4
# The test files are not included in the npm tarball.
Jared K. Smith 9298fe4
Source1:	https://raw.githubusercontent.com/jonschlinkert/is-glob/%{version}/test.js
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
BuildArch:	noarch
Jared K. Smith 9298fe4
%if 0%{?fedora} >= 19
Jared K. Smith 9298fe4
ExclusiveArch: %{nodejs_arches} noarch
Jared K. Smith 9298fe4
%else
Jared K. Smith 9298fe4
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Jared K. Smith 9298fe4
%endif
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
BuildRequires:	nodejs-packaging
Jared K. Smith 9298fe4
BuildRequires:	npm(is-extglob)
Jared K. Smith 9298fe4
%if 0%{?enable_tests}
Jared K. Smith 9298fe4
BuildRequires:	mocha
Jared K. Smith 9298fe4
BuildRequires:	npm(should)
Jared K. Smith 9298fe4
%endif
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%description
Jared K. Smith 9298fe4
Returns `true` if the given string looks like a glob pattern or an extglob
Jared K. Smith 9298fe4
pattern. This makes it easy to create code that only uses external modules
Jared K. Smith 9298fe4
like node-glob when necessary, resulting in much faster code execution and
Jared K. Smith 9298fe4
initialization time, and a better user experience.
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%prep
Jared K. Smith 9298fe4
%setup -q -n package
Jared K. Smith 9298fe4
# setup the tests
Jared K. Smith 9298fe4
cp -p %{SOURCE1} .
Jared K. Smith 9298fe4
Jared K. Smith 04d6b88
%nodejs_fixdep is-extglob
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%build
Jared K. Smith 9298fe4
# nothing to do!
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%install
Jared K. Smith 9298fe4
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 9298fe4
cp -pr package.json index.js \
Jared K. Smith 9298fe4
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%nodejs_symlink_deps
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%check
Jared K. Smith 9298fe4
%nodejs_symlink_deps --check
Jared K. Smith 9298fe4
ln -s %{nodejs_sitelib}/should node_modules/should
Jared K. Smith 9298fe4
%{__nodejs} -e 'require("./")'
Jared K. Smith 9298fe4
%if 0%{?enable_tests}
Jared K. Smith 9298fe4
%{_bindir}/mocha -R spec
Jared K. Smith 9298fe4
%else
Jared K. Smith 9298fe4
%{_bindir}/echo "Tests disabled..."
Jared K. Smith 9298fe4
%endif
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%files
Jared K. Smith 9298fe4
%{!?_licensedir:%global license %doc}
Jared K. Smith 9298fe4
%doc *.md
Jared K. Smith 9298fe4
%license LICENSE
Jared K. Smith 9298fe4
%{nodejs_sitelib}/%{packagename}
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
Jared K. Smith 9298fe4
%changelog
0b32e5a
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-2
0b32e5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0b32e5a
Jared K. Smith 04d6b88
* Tue Sep 19 2017 Jared Smith <jsmith@fedoraproject.org> - 4.0.0-1
Jared K. Smith 04d6b88
- Update to upstream 4.0.0 release
Jared K. Smith 04d6b88
1ae5689
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-3
1ae5689
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1ae5689
dc0e10c
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-2
dc0e10c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
Jared K. Smith 04d6b88
Jared K. Smith 9298fe4
* Tue Feb  9 2016 Jared Smith <jsmith@fedoraproject.org> - 2.0.1-1
Jared K. Smith 9298fe4
- Initial packaging