%{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-esprima Version: 2.7.0 Release: 2%{?dist} Summary: ECMAScript parsing infrastructure for multipurpose analysis # License text is in README.md License: BSD Group: System Environment/Libraries URL: https://github.com/jquery/esprima Source0: http://registry.npmjs.org/esprima/-/esprima-%{version}.tgz # The test files are not included in the npm tarball. # Source1,2 are generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source2: tools-%{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(glob) BuildRequires: npm(everything.js) BuildRequires: npm(json-diff) %endif %description %{summary}. %prep %setup -q -n package %setup -q -T -D -a 1 -n package %setup -q -T -D -a 2 -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/esprima cp -pr package.json esprima.js \ %{buildroot}%{nodejs_sitelib}/esprima mkdir -p %{buildroot}%{_bindir} for i in esparse.js esvalidate.js; do install -p -D -m0755 bin/${i} %{buildroot}%{nodejs_sitelib}/esprima/bin/${i} ln -s %{nodejs_sitelib}/esprima/bin/${i} %{buildroot}%{_bindir}/${i} done %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %__nodejs tools/generate-fixtures.js %__nodejs test/unit-tests.js %__nodejs test/grammar-tests.js %__nodejs test/regression-tests.js %endif %files %doc README.md %{nodejs_sitelib}/esprima %{_bindir}/esparse.js %{_bindir}/esvalidate.js %changelog * Fri Nov 06 2015 Jared Smith - 2.7.0-2 - Update to upstream 2.7.0 release * Mon Oct 19 2015 Jared Smith - 2.6.0-1 - Update to upstream 2.6.0 release * Wed Jun 17 2015 Fedora Release Engineering - 1.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Apr 18 2014 Jamie Nguyen - 1.1.1-1 - update to upstream release 1.1.1 * Wed Sep 04 2013 Jamie Nguyen - 1.0.4-1 - update to upstream release 1.0.4 * Sat Aug 03 2013 Fedora Release Engineering - 1.0.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Jul 21 2013 Jamie Nguyen - 1.0.3-3 - restrict to compatible arches * Fri May 31 2013 Jamie Nguyen - 1.0.3-2 - add comment about how man pages were generated - add comment about downloading of test directory * Wed May 29 2013 Jamie Nguyen - 1.0.3-1 - update to upstream release 1.0.3 * Sun Feb 17 2013 Jamie Nguyen - 1.0.2-1 - initial package