%global enable_tests 0 Name: nodejs-get Version: 1.2.1 Release: 3%{?dist} Summary: A slightly higher-level HTTP client for node License: BSD URL: http://github.com/developmentseed/node-get Source0: http://registry.npmjs.org/get/-/get-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated using Source10, which pulls from the upstream # version control repository. Source1: get-tests-v%{version}.tar.bz2 Source10: get-dl-tests.sh # Accepted upstream - https://github.com/developmentseed/node-get/pull/6 Patch0: nodejs-get-md5.patch # From upstream - https://github.com/developmentseed/node-get/commit/05a5735327f467f10744336ee6f1eb472bf7f5b4 Patch1: nodejs-get-resume.patch BuildArch: noarch BuildRequires: nodejs-devel %if 0%{?enable_tests} BuildRequires: npm(mocha) %endif %description %summary %prep %setup -q -n package %setup -T -D -a 1 -q -n package %patch0 -p1 -b .md5 %patch1 -p1 rm -rf node_modules %build %install mkdir -p %{buildroot}/%{nodejs_sitelib}/get cp -pr package.json lib %{buildroot}/%{nodejs_sitelib}/get %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{nodejs_sitelib}/mocha/bin/mocha -R spec %endif %files %doc LICENSE README.md CHANGELOG.md %{nodejs_sitelib}/get %changelog * Fri Jun 7 2013 Tom Hughes <tom@compton.nu> - 1.2.1-3 - Replace local patch with one from upstream * Tue Apr 30 2013 Tom Hughes <tom@compton.nu> - 1.2.1-2 - Add comments to document patches - Increase timeout on tests * Mon Feb 25 2013 Tom Hughes <tom@compton.nu> - 1.2.1-1 - Initial build of 1.2.1