%{?nodejs_find_provides_and_requires} # npm(chai) not available on EL6. %if 0%{?fedora} || 0%{?rhel} >= 7 %global enable_tests 1 %endif Name: nodejs-esutils Version: 2.0.2 Release: 1%{?dist} Summary: Utility box for ECMAScript language tools License: BSD Group: System Environment/Libraries URL: https://github.com/Constellation/esutils Source0: http://registry.npmjs.org/esutils/-/esutils-%{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 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(chai) BuildRequires: npm(coffee-script) BuildRequires: npm(mocha) %endif %description %{summary}. %prep %setup -q -n package # setup test files %setup -q -T -D -a 1 -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/esutils cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/esutils %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha --compilers coffee:coffee-script/register -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc README.md %license LICENSE.BSD %{nodejs_sitelib}/esutils %changelog * Fri Feb 19 2016 Jared Smith - 2.0.2-1 - Update to upstream 2.0.2 release * Thu Feb 04 2016 Fedora Release Engineering - 1.0.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sat Nov 14 2015 Tom Hughes - 1.0.0-6 - update for changes to coffee-script * Wed Jun 17 2015 Fedora Release Engineering - 1.0.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed Apr 16 2014 Jamie Nguyen - 1.0.0-3 - only enable tests on Fedora and RHEL >= 7 * Sun Apr 13 2014 Jamie Nguyen - 1.0.0-2 - fix License tag - add LICENSE.BSD file from upstream version control repository * Sat Mar 29 2014 Jamie Nguyen - 1.0.0-1 - initial package