%global npmname net-browserify-alt Name: nodejs-%{npmname} Version: 1.1.0 Release: 1%{?dist} Summary: A port of the net module for the browser License: MIT URL: https://www.npmjs.com/package/%{npmname} Source0: https://registry.npmjs.org/%{npmname}/-/%{npmname}-%{version}.tgz BuildRequires: nodejs-packaging BuildRequires: nodejs-ws, nodejs-body-parser, nodejs-bufferutil BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch %description net module for browserify, with a websocket server proxy. Supported methods: net.connect(options, cb) net.isIP(input), net.isIPv4(input), net.isIPv6(input) Examples are available in examples/. %prep %autosetup -n package %nodejs_fixdep bufferutil %nodejs_fixdep body-parser %nodejs_fixdep ws %build # Nothing to build, this is a noarch package %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npmname} cp -a api.js browser.js %{buildroot}%{nodejs_sitelib}/%{npmname}/ cp -a package.json %{buildroot}%{nodejs_sitelib}/%{npmname}/ %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %files %{nodejs_sitelib}/%{npmname}/ %license LICENSE %doc README.md examples/ %changelog * Sun Feb 26 2017 Ben Rosser - 1.1.0-1 - Initial package.