# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename pac-proxy-agent Name: nodejs-pac-proxy-agent Version: 0.1.2 Release: 1%{?dist} Summary: A PAC file proxy `http.Agent` implementation for HTTP Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/pac-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(agent-base) BuildRequires: npm(stream-to-array) BuildRequires: npm(extend) BuildRequires: npm(debug) BuildRequires: npm(pac-resolver) BuildRequires: npm(get-uri) Requires: npm(agent-base) Requires: npm(stream-to-array) Requires: npm(extend) Requires: npm(debug) Requires: npm(pac-resolver) Requires: npm(get-uri) # Circular dependency. :( #BuildRequires: npm(proxy-agent) #Requires: npm(proxy-agent) %if 0%{?enable_tests} BuildRequires: npm(mocha) %endif %description This module provides an `http.Agent` implementation that retreives the specified [PAC proxy file][pac-wikipedia] and uses it to resolve which HTTP, HTTPS, or SOCKS proxy, or if a direct connection should be used to connect to the HTTP endpoint. %prep %setup -q -n package # Remove bundled node_modules if there are any.. rm -rf node_modules/ # Circular dep %nodejs_fixdep -r proxy-agent %nodejs_fixdep --caret %nodejs_fixdep stream-to-array ~x %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/pac-proxy-agent cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/pac-proxy-agent %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha --reporter spec %endif %files %doc README.md %{nodejs_sitelib}/pac-proxy-agent/ %changelog * Tue Jul 22 2014 Ralph Bean - 0.1.2-1 - Initial packaging for Fedora.