Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global packagename is-builtin-module
%global enable_tests 0
# tests disabed until 'ava' is packaged in Fedora

Name:		nodejs-is-builtin-module
Version:	1.0.0
Release:	2%{?dist}
Summary:	Check if a string matches the name of a Node.js builtin module

License:	MIT
URL:		https://github.com/sindresorhus/is-builtin-module
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
# Get the test.js file from the upstream github repo
Source1:	https://raw.githubusercontent.com/sindresorhus/is-builtin-module/v%{version}/test.js


ExclusiveArch:	%{nodejs_arches} noarch
BuildArch:	noarch

BuildRequires:	nodejs-packaging
%if 0%{?enable_tests}
#BuildRequires:	npm(ava)
%endif

Requires:	nodejs

%description
Check if a string matches the name of a Node.js builtin module


%prep
%setup -q -n package
cp -p %{SOURCE1} .


%build
# nothing to do!

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json *.js \
	%{buildroot}%{nodejs_sitelib}/%{packagename}

%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%{__nodejs} test.js
%endif


%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license license
%{nodejs_sitelib}/%{packagename}



%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Oct 26 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.0-1
- Initial packaging