%{?nodejs_find_provides_and_requires} %global packagename append-field # Tests disabled, as the test data doesn't have a proper license # See https://github.com/LinusU/testdata-w3c-json-form/issues/1 %global enable_tests 0 Name: nodejs-append-field Version: 1.0.0 Release: 1%{?dist} Summary: A W3C HTML JSON forms spec compliant field appender License: MIT URL: https://github.com/LinusU/node-append-field Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha %endif %description A [W3C HTML JSON forms spec](http://www.w3.org/TR/html-json-forms/) compliant field appender (for lack of a better name). Useful for people implementing 'application/x-www-form-urlencoded' and 'multipart/form-data' parsers. %prep %autosetup -n package %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Tue Oct 3 2017 Jared Smith - 1.0.0-1 - Initial packaging