%{?nodejs_find_provides_and_requires} %global packagename cli-table # tests disabled due to missing npm(expresso) %global enable_tests 0 Name: nodejs-cli-table Version: 0.3.1 Release: 3%{?dist} Summary: Pretty unicode tables for the CLI License: MIT URL: https://github.com/Automattic/cli-table.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source10: dl-tests.sh ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(colors) >= 1.0.3 %if 0%{?enable_tests} BuildRequires: npm(expresso) %endif Requires: nodejs %description Pretty unicode tables for the CLI %prep %setup -q -n package # setup the tests %setup -q -T -D -a 1 -n package %nodejs_fixdep colors %build # nothing to do! %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}/expresso test/*.test.js %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %{nodejs_sitelib}/%{packagename} %changelog * Tue Oct 20 2015 Jared Smith - 0.3.1-3 - Fix version of dependency on npm(colors) * Tue Oct 20 2015 Jared Smith - 0.3.1-2 - Update BuildRequires * Mon Oct 19 2015 Jared Smith - 0.3.1-1 - Initial packaging