%{?nodejs_find_provides_and_requires} %global enable_tests 0 # tests disabled until we get 'ava' packaged in Fedora Name: nodejs-strip-ansi Version: 3.0.1 Release: 1%{?dist} Summary: Strip ANSI escape codes (used for colorizing strings in the terminal) License: MIT Group: System Environment/Libraries URL: https://github.com/sindresorhus/strip-ansi Source0: http://registry.npmjs.org/strip-ansi/-/strip-ansi-%{version}.tgz Source1: https://raw.githubusercontent.com/chalk/strip-ansi/v%{version}/test.js BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(ava) %endif %description %{summary}. %prep %setup -q -n package cp -p %{SOURCE1} . %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/strip-ansi cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/strip-ansi # `strip-ansi` is used as the command. mkdir -p %{buildroot}%{_bindir} ln -sf %{nodejs_sitelib}/strip-ansi/cli.js \ %{buildroot}%{_bindir}/strip-ansi %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{__nodejs} test.js %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc readme.md %license license %{nodejs_sitelib}/strip-ansi %{_bindir}/strip-ansi %changelog * Wed Feb 24 2016 Jared Smith - 3.0.1-1 - Update to upstream 3.0.1 release * Mon Feb 15 2016 Jared Smith - 3.0.0-1 - Update to upstream 3.0.0 release * Wed Jun 17 2015 Fedora Release Engineering - 0.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Apr 20 2014 Jamie Nguyen - 0.2.0-1 - update to upstream release 0.2.0 * Thu Mar 13 2014 Jamie Nguyen - 0.1.1-1 - initial package