%{?nodejs_find_provides_and_requires} %global packagename conventional-changelog-writer # Tests run fine locally, but fail in mock/koji %global enable_tests 0 Name: nodejs-conventional-changelog-writer Version: 1.4.1 Release: 1%{?dist} Summary: Write logs based on conventional commits and templates License: MIT URL: https://github.com/conventional-changelog/conventional-changelog-writer Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz Source1: LICENSE-MIT ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(compare-func) BuildRequires: npm(conventional-commits-filter) BuildRequires: npm(dateformat) BuildRequires: npm(handlebars) BuildRequires: npm(json-stringify-safe) BuildRequires: npm(lodash) BuildRequires: npm(semver) BuildRequires: npm(through2) %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(chai) BuildRequires: npm(compare-func) BuildRequires: npm(concat-stream) BuildRequires: npm(meow) BuildRequires: npm(should) BuildRequires: npm(split) %endif %description Write logs based on conventional commits and templates %prep %autosetup -n package cp -p %{SOURCE1} . %nodejs_fixdep dateformat %nodejs_fixdep lodash sed -i '1s/env //' cli.js %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js lib/ templates/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec --require should %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md %license LICENSE-MIT %{nodejs_sitelib}/%{packagename} %changelog * Sun May 7 2017 Jared Smith - 1.4.1-1 - Initial packaging