From 692eb37836562e660d727d9828b283fdf64de777 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Aug 21 2014 13:09:00 +0000 Subject: Initial import (#1122231) --- diff --git a/.gitignore b/.gitignore index e69de29..ba47568 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/proxy-agent-1.1.0.tgz diff --git a/nodejs-proxy-agent.spec b/nodejs-proxy-agent.spec new file mode 100644 index 0000000..0c2f27b --- /dev/null +++ b/nodejs-proxy-agent.spec @@ -0,0 +1,81 @@ +# This macro is needed at the start for building on EL6 +%{?nodejs_find_provides_and_requires} + +%global enable_tests 0 + +%global barename proxy-agent + +Name: nodejs-proxy-agent +Version: 1.1.0 +Release: 1%{?dist} +Summary: Maps proxy protocols to http.Agent implementations + +Group: Development/Libraries +License: MIT +URL: https://www.npmjs.org/package/proxy-agent +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(pac-proxy-agent) +BuildRequires: npm(https-proxy-agent) +BuildRequires: npm(http-proxy-agent) +BuildRequires: npm(socks-proxy-agent) +BuildRequires: npm(lru-cache) + +Requires: npm(pac-proxy-agent) +Requires: npm(https-proxy-agent) +Requires: npm(http-proxy-agent) +Requires: npm(socks-proxy-agent) +Requires: npm(lru-cache) + +%if 0%{?enable_tests} +BuildRequires: npm(superagent) +BuildRequires: npm(mocha) +%endif + + +%description +This module provides a function that returns proxying `http.Agent` +instances to use based off of a given proxy URI. + +%prep +%setup -q -n package + +# Remove bundled node_modules if there are any.. +rm -rf node_modules/ + +%nodejs_fixdep --caret +%nodejs_fixdep lru-cache ~2.x + +%build +%nodejs_symlink_deps --build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/proxy-agent +cp -pr package.json index.js \ + %{buildroot}%{nodejs_sitelib}/proxy-agent + +%nodejs_symlink_deps + + +%check +%if 0%{?enable_tests} +%nodejs_symlink_deps --check +mocha --reporter spec +%endif + + +%files +%doc README.md +%{nodejs_sitelib}/proxy-agent/ + +%changelog +* Tue Jul 22 2014 Ralph Bean - 1.1.0-1 +- Initial packaging for Fedora. diff --git a/sources b/sources index e69de29..507d0e3 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +93393da3d44ffafd4468e47975341283 proxy-agent-1.1.0.tgz