%{?nodejs_find_provides_and_requires} %global packagename crypt %global enable_tests 1 Name: nodejs-crypt Version: 0.0.2 Release: 1%{?dist} Summary: Utilities for encryption and hashing License: BSD URL: https://github.com/pvorb/node-crypt Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{ix86} x86_64 %{arm} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} #BuildRequires: %endif %description Utilities for encryption and hashing. %prep %autosetup -n package %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 %{!?_licensedir:%global license %doc} %doc *.mkd %license LICENSE.mkd %{nodejs_sitelib}/%{packagename} %changelog * Wed Feb 21 2018 Jared Smith - 0.0.2-1 - Initial packaging