%{?nodejs_find_provides_and_requires} %global packagename is-unc-path %global enable_tests 1 Name: nodejs-is-unc-path Version: 0.1.1 Release: 3%{?dist} Summary: Returns true if a filepath is a windows UNC file path License: MIT URL: https://github.com/jonschlinkert/is-unc-path.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. The releases aren't # tagged in GitHub either, so we'll pull from "master" Source1: https://raw.githubusercontent.com/jonschlinkert/is-unc-path/master/test.js BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(unc-path-regex) %if 0%{?enable_tests} BuildRequires: mocha %endif %description Returns true if a filepath is a windows UNC file path. %prep %setup -q -n package # setup the tests cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} /usr/bin/mocha -R spec %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Mon Dec 21 2015 Jared Smith - 0.1.1-3 - Include proper test.js file * Sat Dec 19 2015 Jared Smith - 0.1.1-2 - Add missing build requirement * Wed Dec 16 2015 Jared Smith - 0.1.1-1 - Initial packaging