%{?nodejs_find_provides_and_requires} %global enable_tests 0 # Tests disabled because of missing npm(ava) Name: nodejs-maxmin Version: 2.1.0 Release: 1%{?dist} Summary: Get pretty output of the original, minified gzipped size of a string/buffer License: MIT Group: System Environment/Libraries URL: https://github.com/sindresorhus/maxmin Source0: http://registry.npmjs.org/maxmin/-/maxmin-%{version}.tgz Source1: https://raw.githubusercontent.com/sindresorhus/maxmin/v%{version}/test.js # gzip-size cannot be packaged for fedora<21 or rhel<7 due to the dependency # on js-zlib. To make maxmin available to these older branches, we can remove # the use of gzip-size. This is not ideal, but better than not having the # package available at all. Patch0: %{name}-1.1.0-Remove-use-of-gzip-size.patch BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(chalk) BuildRequires: npm(figures) BuildRequires: npm(pretty-bytes) %if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 BuildRequires: npm(gzip-size) %endif %if 0%{?enable_tests} BuildRequires: npm(ava) %endif %description %{summary}. %prep %setup -q -n package cp -p %{SOURCE1} . %if 0%{?fedora} < 21 && 0%{?rhel} < 7 %patch0 -p1 %endif %nodejs_fixdep chalk ^1.1.1 %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/maxmin cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/maxmin %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/ava %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %license license %doc *.md %{nodejs_sitelib}/maxmin %changelog * Fri Jul 08 2016 Jared Smith - 2.1.0-1 - Update to upstream 2.1.0 release * Mon Feb 22 2016 Tom Hughes - 0.2.0-5 - Update npm(chalk) dependency * Thu Feb 04 2016 Fedora Release Engineering - 0.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * 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 * Thu May 08 2014 Jamie Nguyen - 0.2.0-1 - update to upstream release 0.2.0 - disable use of gzip-size on branches where js-zlib cannot be packaged * Thu Mar 13 2014 Jamie Nguyen - 0.1.0-1 - initial package