# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 1 %global barename smart-buffer Name: nodejs-smart-buffer Version: 1.0.3 Release: 1%{?dist} Summary: A smarter Buffer that keeps track of its own read and write positions while growing endlessly License: MIT URL: https://www.npmjs.org/package/smart-buffer Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz BuildArch: noarch %if 0%{?fedora} ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging >= 6 %if 0%{?enable_tests} BuildRequires: npm(chai) BuildRequires: npm(mocha) %endif %description 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 # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep --caret %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/smart-buffer cp -pr package.json lib \ %{buildroot}%{nodejs_sitelib}/smart-buffer %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha test/test.js %endif %files %doc README.md LICENSE %{nodejs_sitelib}/smart-buffer/ %changelog * Fri Jul 10 2015 Ralph Bean - 1.0.3-1 - Initial packaging for Fedora.