%{?nodejs_find_provides_and_requires} %global packagename conventional-changelog-core # Tests failing until we can work out circular dependencies %global enable_tests 1 Name: nodejs-conventional-changelog-core Version: 2.0.10 Release: 1%{?dist} Summary: The conventional-changelog core License: MIT URL: https://github.com/conventional-changelog/conventional-changelog.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. # Source{1-9} are generated by running Source10, which pulls from the upstream # version control repository. Source1: %{packagename}-tests-%{version}.tar.bz2 Source10: dl-cc-tests.sh BuildArch: noarch ExclusiveArch: %{ix86} x86_64 %{arm} noarch BuildRequires: git BuildRequires: nodejs-packaging BuildRequires: npm(conventional-changelog-writer) BuildRequires: npm(conventional-commits-parser) BuildRequires: npm(dateformat) BuildRequires: npm(get-pkg-repo) BuildRequires: npm(git-raw-commits) BuildRequires: npm(git-semver-tags) BuildRequires: npm(lodash) BuildRequires: npm(normalize-package-data) BuildRequires: npm(q) BuildRequires: npm(read-pkg) BuildRequires: npm(read-pkg-up) BuildRequires: npm(through2) %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(better-than-before) BuildRequires: npm(conventional-changelog-angular) BuildRequires: npm(git-tails) BuildRequires: npm(pinkie-promise) BuildRequires: npm(tmp) %endif %description The conventional-changelog core. %prep %autosetup -n package -p1 # setup the tests %setup -q -T -D -a 1 -n package %if 0%{?enable_tests} %nodejs_fixdep mocha %nodejs_fixdep chai %endif %nodejs_fixdep dateformat %nodejs_fixdep get-pkg-repo '^2.0.0' %nodejs_fixdep lodash %nodejs_fixdep read-pkg '^2.0.0' %nodejs_fixdep read-pkg-up '^2.0.0' %build # nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js hosts/ lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} NODE_ENV=test %{_bindir}/mocha -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE.md %{nodejs_sitelib}/%{packagename} %changelog * Thu Mar 29 2018 jsmith - 2.0.10-1 - Update to upstream 2.0.10 release * Tue Mar 27 2018 jsmith - 2.0.9-1 - Update to upstream 2.0.9 release * Wed Feb 21 2018 Jared Smith - 2.0.4-1 - Initial packaging