%{?nodejs_find_provides_and_requires} %global packagename convert-source-map %global enable_tests 1 Name: nodejs-convert-source-map Version: 1.2.0 Release: 1%{?dist} Summary: Converts a source-map from/to different formats License: MIT URL: https://github.com/thlorenz/convert-source-map.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # Add patch to disable a few failing tests due to newer source-map and # inline-source-map functionality regarding character sets Patch0: convert-source-map_disable-tests-charset.patch BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(inline-source-map) %if 0%{?enable_tests} BuildRequires: npm(tap) %endif %description Converts a source-map from/to different formats and allows adding/changing properties. %prep %setup -q -n package %patch0 -p1 %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/tap test/*.js %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md example/ %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Sat Jun 18 2016 Jared Smith - 1.2.0-1 - Update to upstream 1.2.0 release * Tue Feb 9 2016 Jared Smith - 1.1.3-1 - Initial packaging