%{?nodejs_find_provides_and_requires} %global packagename convert-hex %global enable_tests 1 Name: nodejs-convert-hex Version: 0.1.0 Release: 1%{?dist} Summary: Convert to/from hex string and array of bytes License: MIT #URL: https://github.com/cryptocoinjs/convert-hex URL: https://www.npmjs.org/package/%{packagename} Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # I'd ask upstream to add a license file, but they've gone offline Source1: LICENSE-MIT.txt ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %description Convert to/from hex string and array of bytes %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[102m -=#=- This package has no tests -=#=- \e[0m" %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc *.md %license LICENSE-MIT.txt %{nodejs_sitelib}/%{packagename} %changelog * Fri Apr 21 2017 Jared Smith - 0.1.0-1 - Initial packaging