%{?scl:%scl_package nodejs-%{npm_name}} %{!?scl:%global pkg_name %{name}} %global npm_name exercise-bike Name: %{?scl_prefix}nodejs-exercise-bike Version: 2.0.1 Release: 1%{?dist} Summary: a command line interface for nunjucks License: MIT Group: Development/Libraries URL: https://github.com/jfhbrook/public#readme Source0: https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz Source1: https://registry.npmjs.org/asap/-/asap-2.0.6.tgz Source2: https://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz Source3: https://registry.npmjs.org/bops/-/bops-0.0.6.tgz Source4: https://registry.npmjs.org/commander/-/commander-5.1.0.tgz Source5: https://registry.npmjs.org/concat-stream/-/concat-stream-1.0.1.tgz Source6: https://registry.npmjs.org/exercise-bike/-/exercise-bike-2.0.1.tgz Source7: https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz Source8: https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz Source9: https://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz Source10: nodejs-exercise-bike-%{version}-registry.npmjs.org.tgz BuildRequires: nodejs-npm %if 0%{!?scl:1} BuildRequires: nodejs-packaging %endif BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch Provides: %{?scl_prefix}npm(%{npm_name}) = %{version} Provides: bundled(npm(a-sync-waterfall)) = 1.0.1 Provides: bundled(npm(asap)) = 2.0.6 Provides: bundled(npm(base64-js)) = 0.0.2 Provides: bundled(npm(bops)) = 0.0.6 Provides: bundled(npm(commander)) = 5.1.0 Provides: bundled(npm(concat-stream)) = 1.0.1 Provides: bundled(npm(exercise-bike)) = 2.0.1 Provides: bundled(npm(minimist)) = 1.2.8 Provides: bundled(npm(nunjucks)) = 3.2.4 Provides: bundled(npm(to-utf8)) = 0.0.1 AutoReq: no AutoProv: no %if 0%{?scl:1} %define npm_cache_dir npm_cache %else %define npm_cache_dir /tmp/npm_cache_%{name}-%{version}-%{release} %endif %description %{summary} %prep mkdir -p %{npm_cache_dir} %{?scl:scl enable %{?scl_nodejs} - << \end_of_scl} for tgz in %{sources}; do echo $tgz | grep -q registry.npmjs.org || npm cache add --cache %{npm_cache_dir} $tgz done %{?scl:end_of_scl} %setup -T -q -a 10 -D -n %{npm_cache_dir} %build %{?scl:scl enable %{?scl_nodejs} - << \end_of_scl} npm install --cache-min Infinity --cache %{?scl:../}%{npm_cache_dir} --no-shrinkwrap --no-optional --global-style true %{npm_name}@%{version} %{?scl:end_of_scl} %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/node_modules %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/exb %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/input.html.njk %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/output.html %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} mkdir -p %{buildroot}%{_bindir}/ chmod 0755 %{buildroot}%{nodejs_sitelib}/%{npm_name}/exb ln -sf %{nodejs_sitelib}/%{npm_name}/exb %{buildroot}%{_bindir}/exercise-bike chmod 0755 %{buildroot}%{nodejs_sitelib}/%{npm_name}/exb ln -sf %{nodejs_sitelib}/%{npm_name}/exb %{buildroot}%{_bindir}/exb %clean rm -rf %{buildroot} %{npm_cache_dir} %files %{nodejs_sitelib}/%{npm_name} %{_bindir}/exercise-bike %{_bindir}/exb %changelog