Blame nodejs-is-path-cwd.spec

Jared K. Smith d6328c8
%{?nodejs_find_provides_and_requires}
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%global packagename is-path-cwd
Jared K. Smith d6328c8
%global enable_tests 1
Jared K. Smith d6328c8
Jared K. Smith d6328c8
Name:		nodejs-is-path-cwd
Jared K. Smith d6328c8
Version:	1.0.0
585b18a
Release:	2%{?dist}
Jared K. Smith d6328c8
Summary:	Check if a path is CWD
Jared K. Smith d6328c8
Jared K. Smith d6328c8
License:	MIT
Jared K. Smith d6328c8
URL:		https://github.com/sindresorhus/is-path-cwd
Jared K. Smith d6328c8
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith d6328c8
# The test files are not included in the npm tarball.
Jared K. Smith d6328c8
Source1:	https://raw.githubusercontent.com/sindresorhus/is-path-cwd/v%{version}/test.js
Jared K. Smith d6328c8
# The license file is included in the npm tarball.
Jared K. Smith d6328c8
Source2:	https://raw.githubusercontent.com/sindresorhus/is-path-cwd/v%{version}/license
Jared K. Smith d6328c8
Jared K. Smith d6328c8
Jared K. Smith d6328c8
BuildArch:	noarch
Jared K. Smith d6328c8
%if 0%{?fedora} >= 19
Jared K. Smith d6328c8
ExclusiveArch: %{nodejs_arches} noarch
Jared K. Smith d6328c8
%else
Jared K. Smith d6328c8
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Jared K. Smith d6328c8
%endif
Jared K. Smith d6328c8
Jared K. Smith d6328c8
BuildRequires:	nodejs-packaging
Jared K. Smith d6328c8
%if 0%{?enable_tests}
Jared K. Smith d6328c8
BuildRequires:	mocha
Jared K. Smith d6328c8
%endif
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%description
Jared K. Smith d6328c8
Check if a path is CWD
Jared K. Smith d6328c8
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%prep
Jared K. Smith d6328c8
%setup -q -n package
Jared K. Smith d6328c8
# setup the tests
Jared K. Smith d6328c8
cp -p %{SOURCE1} .
Jared K. Smith d6328c8
# setup the license file
Jared K. Smith d6328c8
cp -p %{SOURCE2} .
Jared K. Smith d6328c8
Jared K. Smith d6328c8
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%build
Jared K. Smith d6328c8
# nothing to do!
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%install
Jared K. Smith d6328c8
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith d6328c8
cp -pr package.json index.js \
Jared K. Smith d6328c8
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%nodejs_symlink_deps
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%check
Jared K. Smith d6328c8
%nodejs_symlink_deps --check
Jared K. Smith d6328c8
%{__nodejs} -e 'require("./")'
Jared K. Smith d6328c8
%if 0%{?enable_tests}
Jared K. Smith d6328c8
%{_bindir}/mocha -R spec
Jared K. Smith d6328c8
%else
Jared K. Smith d6328c8
%{_bindir}/echo "Tests disabled..."
Jared K. Smith d6328c8
%endif
Jared K. Smith d6328c8
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%files
Jared K. Smith d6328c8
%{!?_licensedir:%global license %doc}
Jared K. Smith d6328c8
%doc *.md
Jared K. Smith d6328c8
%license license
Jared K. Smith d6328c8
%{nodejs_sitelib}/%{packagename}
Jared K. Smith d6328c8
Jared K. Smith d6328c8
Jared K. Smith d6328c8
%changelog
585b18a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
585b18a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
585b18a
Jared K. Smith d6328c8
* Wed Feb  3 2016 Jared Smith <jsmith@fedoraproject.org> - 1.0.0-1
Jared K. Smith d6328c8
- Initial packaging