%{?nodejs_find_provides_and_requires} %global packagename csv %global enable_tests 1 Name: nodejs-csv Version: 1.1.1 Release: 1%{?dist} Summary: CSV parser with simple api, full of options and tested against large datasets License: BSD URL: https://github.com/wdavidw/node-csv Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: coffee-script BuildRequires: npm(csv-generate) BuildRequires: npm(csv-parse) BuildRequires: npm(stream-transform) BuildRequires: npm(csv-stringify) %description CSV parser with simple api, full of options and tested against large datasets. %prep %setup -q -n package # remove the pre-build scripts rm lib/*.js %build %{_bindir}/coffee -c -b -o lib/ src/ %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/echo -e "\e[103m -=#=- There are no tests -=#=- \e[0m" %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Sun Sep 24 2017 Jared Smith - 1.1.1-1 - Update to upstream 1.1.1 release * Sat Nov 7 2015 Jared Smith - 0.4.6-1 - Initial packaging