# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename file-uri-to-path Name: nodejs-file-uri-to-path Version: 0.0.2 Release: 1%{?dist} Summary: Convert a file: URI to a file path Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/file-uri-to-path 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 %if 0%{?enable_tests} BuildRequires: npm(mocha) %endif %description Accepts a file: URI and returns a regular file path suitable for use with the fs module functions. %prep %setup -q -n package # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep --caret %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/file-uri-to-path cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/file-uri-to-path %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha --reporter spec %endif %files %doc %{nodejs_sitelib}/file-uri-to-path/ %changelog * Tue Jul 22 2014 Ralph Bean - 0.0.2-1 - Initial packaging for Fedora.