%{?scl:%scl_package nodejs-%{npm_name}} %{!?scl:%global pkg_name %{name}} %global npm_name licenseify Name: %{?scl_prefix}nodejs-licenseify Version: 1.1.3 Release: 1%{?dist} Summary: A tool for scaffolding out LICENSE files License: MIT Group: Development/Libraries URL: https://www.npmjs.com/package/licenseify Source0: https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz Source1: https://registry.npmjs.org/async/-/async-2.6.4.tgz Source2: https://registry.npmjs.org/funstance/-/funstance-0.0.2.tgz Source3: https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz Source4: https://registry.npmjs.org/kenny-loggins/-/kenny-loggins-0.0.2.tgz Source5: https://registry.npmjs.org/licenseify/-/licenseify-1.1.3.tgz Source6: https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz Source7: https://registry.npmjs.org/logref/-/logref-0.2.1.tgz Source8: https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz Source9: https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz Source10: https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz Source11: https://registry.npmjs.org/pinocchio/-/pinocchio-0.1.0.tgz Source12: https://registry.npmjs.org/read/-/read-1.0.7.tgz Source13: https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz Source14: https://registry.npmjs.org/through/-/through-2.3.8.tgz Source15: https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz Source16: https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz Source17: nodejs-licenseify-%{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(ansicolors)) = 0.3.2 Provides: bundled(npm(async)) = 2.6.4 Provides: bundled(npm(funstance)) = 0.0.2 Provides: bundled(npm(handlebars)) = 4.7.8 Provides: bundled(npm(kenny-loggins)) = 0.0.2 Provides: bundled(npm(licenseify)) = 1.1.3 Provides: bundled(npm(lodash)) = 4.17.21 Provides: bundled(npm(logref)) = 0.2.1 Provides: bundled(npm(minimist)) = 1.2.8 Provides: bundled(npm(mute-stream)) = 0.0.8 Provides: bundled(npm(neo-async)) = 2.6.2 Provides: bundled(npm(pinocchio)) = 0.1.0 Provides: bundled(npm(read)) = 1.0.7 Provides: bundled(npm(source-map)) = 0.6.1 Provides: bundled(npm(through)) = 2.3.8 Provides: bundled(npm(uglify-js)) = 3.17.4 Provides: bundled(npm(wordwrap)) = 1.0.0 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 17 -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}/bin.js %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/generate.js %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/list.js %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/pretty-error.js %{buildroot}%{nodejs_sitelib}/%{npm_name} mkdir -p %{buildroot}%{_bindir}/ chmod 0755 %{buildroot}%{nodejs_sitelib}/%{npm_name}/bin.js ln -sf %{nodejs_sitelib}/%{npm_name}/bin.js %{buildroot}%{_bindir}/licenseify %clean rm -rf %{buildroot} %{npm_cache_dir} %files %{nodejs_sitelib}/%{npm_name} %{_bindir}/licenseify %changelog