%global enable_tests 1 %global srcname smart-buffer Name: nodejs-%{srcname} Version: 1.0.3 Release: 1%{?dist} Summary: Nodejs module for smarter Buffer License: MIT URL: https://github.com/JoshGlazebrook/smart-buffer Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) BuildRequires: npm(chai) %endif %description A smarter Buffer that keeps track of its own read and write positions while growing endlessly. smart-buffer is a light Buffer wrapper that takes away the need to keep track of what position to read and write data to and from the underlying Buffer. It also adds null terminating string operations and grows as you add more data. %prep %setup -q -n package rm -rf node_modules %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha test/test.js %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Sun Aug 30 2015 Piotr Popieluch - 1.0.3-1 - Initial package