%{?scl:%scl_package nodejs-%{npm_name}} %{!?scl:%global pkg_name %{name}} %global npm_name sass Name: %{?scl_prefix}nodejs-sass Version: 1.60.0 Release: 1%{?dist} Summary: A pure JavaScript implementation of Sass License: MIT Group: Development/Libraries URL: https://github.com/sass/dart-sass Source0: https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz Source1: https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz Source2: https://registry.npmjs.org/braces/-/braces-3.0.2.tgz Source3: https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz Source4: https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz Source5: https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz Source6: https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz Source7: https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz Source8: https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz Source9: https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz Source10: https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz Source11: https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz Source12: https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz Source13: https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz Source14: https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz Source15: https://registry.npmjs.org/sass/-/sass-1.60.0.tgz Source16: https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz Source17: https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz Source18: nodejs-sass-%{version}-registry.npmjs.org.tgz BuildRequires: %{?scl_prefix_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(anymatch)) = 3.1.3 Provides: bundled(npm(binary-extensions)) = 2.2.0 Provides: bundled(npm(braces)) = 3.0.2 Provides: bundled(npm(chokidar)) = 3.5.3 Provides: bundled(npm(fill-range)) = 7.0.1 Provides: bundled(npm(fsevents)) = 2.3.3 Provides: bundled(npm(glob-parent)) = 5.1.2 Provides: bundled(npm(immutable)) = 4.3.5 Provides: bundled(npm(is-binary-path)) = 2.1.0 Provides: bundled(npm(is-extglob)) = 2.1.1 Provides: bundled(npm(is-glob)) = 4.0.3 Provides: bundled(npm(is-number)) = 7.0.0 Provides: bundled(npm(normalize-path)) = 3.0.0 Provides: bundled(npm(picomatch)) = 2.3.1 Provides: bundled(npm(readdirp)) = 3.6.0 Provides: bundled(npm(sass)) = 1.60.0 Provides: bundled(npm(source-map-js)) = 1.0.2 Provides: bundled(npm(to-regex-range)) = 5.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 18 -D -n %{npm_cache_dir} %build %{?scl:scl enable %{?scl_nodejs} - << \end_of_scl} npm install --legacy-peer-deps --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}/package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/sass.dart.js %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/sass.default.js %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/sass.js %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/types %{buildroot}%{nodejs_sitelib}/%{npm_name} mkdir -p %{buildroot}%{_bindir}/ chmod 0755 %{buildroot}%{nodejs_sitelib}/%{npm_name}/sass.js ln -sf %{nodejs_sitelib}/%{npm_name}/sass.js %{buildroot}%{_bindir}/sass %clean rm -rf %{buildroot} %{npm_cache_dir} %files %{nodejs_sitelib}/%{npm_name} %{_bindir}/sass %license node_modules/%{npm_name}/LICENSE %doc node_modules/%{npm_name}/README.md %changelog * Tue Jan 30 2024 Evgeni Golov 1.60.0-1 - Add nodejs-sass generated by npm2rpm using the bundle strategy