# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} # run tests partially %global enable_tests 1 %global barename get-uri Name: nodejs-get-uri Version: 2.0.1 Release: 1%{?dist} Summary: Returns a stream.Readable from a URI string # License is in README.md License: MIT URL: https://www.npmjs.org/package/get-uri Source0: https://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) # run tests partially, st and ftpd are not yet in Fedora 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/ # run tests partially, st and ftpd are not yet in Fedora rm -f test/ftp.js test/http.js test/https.js sed -i "/var ftpd = require('ftpd');/d" test/test.js sed -i "/var st = require('st');/d" test/test.js %nodejs_fixdep --caret %nodejs_fixdep data-uri-to-buffer %nodejs_fixdep extend %nodejs_fixdep readable-stream ~2.x %nodejs_fixdep debug %build # nothing to 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 %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec %endif %files %doc README.md %{nodejs_sitelib}/get-uri/ %changelog * Mon Sep 18 2017 Jared Smith - 2.0.1-1 - Update to upstream 2.0.1 release * Wed Jul 26 2017 Fedora Release Engineering - 1.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 1.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Feb 04 2016 Fedora Release Engineering - 1.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Aug 31 2015 Piotr Popieluch - 1.1.0-2 - fixdep nodejs-debug * Sun Aug 30 2015 Piotr Popieluch - 1.1.0-1 - update to 1.1.0 - enable tests partially - update Source0 to use https * Wed Jul 22 2015 Parag Nemade - 0.1.3-4 - fixdep npm(readable-stream) * Mon Jul 13 2015 Parag Nemade - 0.1.3-3 - fixdep npm(extend) * Wed Jun 17 2015 Fedora Release Engineering - 0.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Jul 22 2014 Ralph Bean - 0.1.3-1 - Initial packaging for Fedora.