Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global packagename is-node
%global enable_tests 1

Name:		nodejs-is-node
Version:	1.0.2
Release:	3%{?dist}
Summary:	Detect if current process is a node application or not

License:	MIT
URL:		https://github.com/MatthewNPM/is-node.git
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz

# License file requested at https://github.com/MatthewNPM/is-node/pull/4
Source1:	LICENSE

BuildArch:	noarch
ExclusiveArch: %{nodejs_arches} noarch

BuildRequires:	nodejs-packaging

%if 0%{?enable_tests}
# nothing
%endif

%description
Detect if current process is a node application or not.


%prep
%autosetup -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

%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/echo -e "\e[103m -=#=- This package has no tests -=#=- \e[0m"
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif

%files
%doc *.md examples/
%license LICENSE
%{nodejs_sitelib}/%{packagename}

%changelog
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed May  2 2018 Jared K. Smith <jsmith@fedoraproject.org> - 1.0.2-1
- Initial packaging