%{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-esprima Version: 1.0.4 Release: 1%{?dist} Summary: ECMAScript parsing infrastructure for multipurpose analysis # License text is in README.md License: BSD Group: System Environment/Libraries URL: https://github.com/ariya/esprima Source0: http://registry.npmjs.org/esprima/-/esprima-%{version}.tgz # The npm tarball does not include the test/ directory, so it must be # downloaded separately in order to run the unit tests. # Source1 is generated by running Source10, which pulls from the upstream # revision control repository. Source1: tests-%{version}.tar.bz2 # Man pages based on output from help2man. Source2: esparse.1 Source3: esvalidate.1 # This script pulls the test/ directory from the specified tag and compresses # it into a tarball. 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 %description %{summary}. %prep %setup -q -n package %setup -q -T -D -a 1 -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 install -p -D -m0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/esparse.1 install -p -D -m0644 %{SOURCE3} %{buildroot}%{_mandir}/man1/esvalidate.1 %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %__nodejs test/run.js %endif %files %doc README.md %{nodejs_sitelib}/esprima %{_bindir}/esparse.js %{_bindir}/esvalidate.js %{_mandir}/man1/esparse.1* %{_mandir}/man1/esvalidate.1* %changelog * Wed Sep 04 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.4-1 - update to upstream release 1.0.4 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Jul 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.3-3 - restrict to compatible arches * Fri May 31 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 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 <jamielinux@fedoraproject.org> - 1.0.3-1 - update to upstream release 1.0.3 * Sun Feb 17 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.2-1 - initial package