## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global npm_name cssnano %global _description %{expand: Cssnano is a modern, modular compression tool written on top of the PostCSS ecosystem, which allows us to use a lot of powerful features in order to compact CSS appropriately. } Name: nodejs-%{npm_name} Version: 7.0.7 Release: %autorelease Summary: A modular minifier, built on top of the PostCSS ecosystem # The entire source code is MIT, and the rest is bundled licenses from node_modules License: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND CC-BY-4.0 AND ISC AND MIT URL: https://github.com/cssnano/%{npm_name} Source0: https://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz Source1: %{npm_name}-%{version}-nm-prod.tgz Source2: %{npm_name}-%{version}-nm-dev.tgz Source3: %{npm_name}-%{version}-bundled-licenses.txt Source4: https://registry.npmjs.org/%{npm_name}-preset-advanced/-/%{npm_name}-preset-advanced-%{version}.tgz Source5: %{npm_name}-preset-advanced-%{version}-nm-prod.tgz Source6: %{npm_name}-preset-advanced-%{version}-nm-dev.tgz Source7: %{npm_name}-preset-advanced-%{version}-bundled-licenses.txt BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-devel Requires: nodejs %description %{_description} %package -n preset-advanced Summary: Advanced optimisations preset for cssnano # This aggregated license field is for the preset and its bundled dependencies. # it is the same as the main package License: MIT AND BSD-3-Clause AND CC-BY-4.0 AND ISC Requires: nodejs-%{npm_name} = %{version}-%{release} %description -n preset-advanced This package provides the "advanced" preset for cssnano, which enables more aggressive CSS optimizations. %prep %autosetup -n package cp %{SOURCE3} . # Setup bundled runtime(prod) node modules tar xfz %{SOURCE1} mkdir -p node_modules pushd node_modules ln -s ../node_modules_prod/* . ln -s ../node_modules_prod/.bin . popd # advanced preset # Setup bundled runtime(prod) node modules for the preset tar xfz %{SOURCE5} mkdir -p node_modules pushd node_modules ln -s ../node_modules_prod/* . ln -s ../node_modules_prod/.bin . popd %build # nothing to build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pr package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pr src %{buildroot}%{nodejs_sitelib}/%{npm_name} # Copy over bundled nodejs modules cp -pr node_modules node_modules_prod %{buildroot}%{nodejs_sitelib}/%{npm_name} # Copy over the preset mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}-preset-advanced cp -pr package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}-preset-advanced cp -pr src %{buildroot}%{nodejs_sitelib}/%{npm_name}-preset-advanced # Copy over bundled nodejs modules for the preset cp -pr node_modules node_modules_prod %{buildroot}%{nodejs_sitelib}/%{npm_name}-preset-advanced %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %files # LICENSE-MIT is the license from source code, and the bundled licenses are from node_modules %license LICENSE-MIT %{npm_name}-%{version}-bundled-licenses.txt %doc README.md %{nodejs_sitelib}/%{npm_name} %files -n preset-advanced %license LICENSE-MIT %{npm_name}-preset-advanced-%{version}-bundled-licenses.txt %doc README.md %{nodejs_sitelib}/%{npm_name}-preset-advanced %changelog ## START: Generated by rpmautospec * Tue Aug 05 2025 Jiri Kyjovsky - 7.0.7-3 - Uncommitted changes * Thu Jul 24 2025 Fedora Release Engineering - 7.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Tue Jul 15 2025 Jiri Kyjovsky - 7.0.7-1 - Initial package ## END: Generated by rpmautospec