# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename get-uri Name: nodejs-get-uri Version: 0.1.3 Release: 1%{?dist} Summary: Returns a stream.Readable from a URI string Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/get-uri Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging >= 6 BuildRequires: npm(ftp) BuildRequires: npm(file-uri-to-path) BuildRequires: npm(extend) BuildRequires: npm(readable-stream) BuildRequires: npm(debug) BuildRequires: npm(data-uri-to-buffer) Requires: npm(ftp) Requires: npm(file-uri-to-path) Requires: npm(extend) Requires: npm(readable-stream) Requires: npm(debug) Requires: npm(data-uri-to-buffer) %if 0%{?enable_tests} BuildRequires: npm(mocha) BuildRequires: npm(stream-to-array) BuildRequires: npm(ftpd) BuildRequires: npm(st) %endif %description This high-level module accepts a URI string and returns a `Readable` stream instance. There is built-in support for a variety of "protocols", and it's easily extensible with more: %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}/get-uri cp -pr package.json notmodified.js notfound.js file.js ftp.js http.js https.js data.js index.js \ %{buildroot}%{nodejs_sitelib}/get-uri %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha --reporter spec %endif %files %doc README.md %{nodejs_sitelib}/get-uri/ %changelog * Tue Jul 22 2014 Ralph Bean - 0.1.3-1 - Initial packaging for Fedora.