%global enable_tests 1 %global srcname node-int64 Name: nodejs-%{srcname} Version: 0.3.2 Release: 1%{?dist} Summary: Support for representing 64-bit integers in JavaScript License: MIT URL: https://github.com/broofa/node-int64 Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz # license requested: https://github.com/broofa/node-int64/issues/11 Source1: https://raw.githubusercontent.com/broofa/node-int64/master/LICENSE BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} %endif %description JavaScript Numbers are represented as IEEE 754 double-precision floats. Unfortunately, this means they lose integer precision for values beyond +/- 2^^53. For projects that need to accurately handle 64-bit ints, such as node-thrift, a performant, Number-like class is needed. Int64 is that class. %prep %setup -q -n package rm -rf node_modules/ cp -p %{SOURCE1} . %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json Int64.js %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check node test.js %endif %files %doc README.md LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Mon Dec 22 2014 Piotr Popieluch - 0.3.2-1 - Initial package