%global shortname acorn # We'll temporarily bootstrap with pre-compiled versions in order to build # newer version of npm(rollup-plugin-buble), then re-build from source with # the help of npm(buble) and npm(rollup-plugin-buble). %global bootstrap 1 Name: nodejs-%{shortname} Version: 3.3.0 Release: 1%{?dist} Summary: ECMAScript parser License: MIT URL: https://github.com/ternjs/acorn Source0: http://registry.npmjs.org/%{shortname}/-/%{shortname}-%{version}.tgz # The test files are not included in the npm tarball. # Source{1-9} are generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source10: dl-tests.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %description A tiny, fast JavaScript parser, written completely in JavaScript. %prep %setup -qn package # setup the tests %setup -q -T -D -a 1 -n package %build %if 0%{?bootstrap} # nothing %else %{_bindir}/rollup -c rollup/config.main.js %{_bindir}/rollup -c rollup/config.walk.js %{_bindir}/rollup -c rollup/config.loose.js %{_bindir}/rollup -c rollup/config.bin.js %endif %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{shortname}/ cp -pr package.json bin/ dist/ \ %{buildroot}%{nodejs_sitelib}/%{shortname} mkdir -p %{buildroot}%{_bindir} ln -sf %{nodejs_sitelib}/${shortname}/bin/acorn \ %{buildroot}%{_bindir}/${shortname} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' node test/run.js %files %{!?_licensedir:%global license %doc} %license LICENSE %doc README.md %{nodejs_sitelib}/%{shortname} %{_bindir}/%{shortname} %changelog * Mon Aug 01 2016 Jared Smith - 3.3.0-1 - Update to upstream 3.3.0 release * Thu Jul 07 2016 Jared Smith - 3.2.0-1 - Update to upstream 3.2.0 release * Fri Feb 26 2016 Jared Smith - 3.0.4-1 - Update to upstream 3.0.4 release * Thu Feb 04 2016 Fedora Release Engineering - 0.9.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Nov 27 2014 Gerard Ryan - 0.9.0-3 - Fix install path of util/walk.js * Tue Nov 25 2014 Gerard Ryan - 0.9.0-2 - Don't package util/test_walk.js * Sat Nov 22 2014 Gerard Ryan - 0.9.0-1 - Initial package