%global enable_tests 1 %global srcname hash_file Name: nodejs-%{srcname} Version: 0.1.1 Release: 2 Summary: A simple utility for getting a hash of a file License: MIT URL: https://github.com/timoxley/hash_file Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz Patch1: deprecated-md4-function.patch BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) %endif %description %{summary}. %prep %setup -q -n package %patch1 -p1 rm -rf node_modules/ %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha -t 60000 ./test/test.js %endif %files %doc README.md %{nodejs_sitelib}/%{srcname} %changelog * Fri Feb 10 2023 Ge Wang - 0.1.1-2 - Deprected md4 function due to openssl updated to verson 3.0.8 * Thu Aug 20 2020 wangxiao - 0.1.1-1 - Package init