%{?nodejs_find_provides_and_requires} %global fix_symlink_deps 1 %global packagename sockjs Name: nodejs-sockjs Version: 0.3.19 Release: 1%{?dist} Summary: SockJS-node is a server counterpart of SockJS-client a JavaScript library that provides a WebSocket-like object in the browser. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server. License: MIT URL: https://github.com/sockjs/sockjs-node Source0: http://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(faye-websocket) BuildRequires: npm(uuid) Provides: npm(%{packagename}) %description SockJS-node is a server counterpart of SockJS-client a JavaScript library that provides a WebSocket-like object in the browser. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server. %prep %setup -n "package" rm -Rf node_modules %nodejs_fixdep faye-websocket %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr * %{buildroot}%{nodejs_sitelib}/%{packagename} %if 0%{?fix_symlink_deps} %{nodejs_symlink_deps} %endif %check %{nodejs_symlink_deps} --check %{__nodejs} -e 'require("./")' %files %doc %license %{nodejs_sitelib}/%{packagename} %changelog