Name: cockpit-starter-kit Version: 1 Release: 1.20251117072207613919.pr1290%{?dist} Summary: Cockpit Starter Kit Example Module License: LGPL-2.1-or-later # distributions which ship nodejs-esbuild can rebuild the bundle during package build %if 0%{?fedora} >= 42 %define rebuild_bundle 1 %endif Source0: cockpit-starter-kit-1.tar.xz %if %{defined rebuild_bundle} Source1: cockpit-starter-kit-node-1.tar.xz %endif BuildArch: noarch %if ! 0%{?suse_version} ExclusiveArch: %{nodejs_arches} noarch %endif %if ! 0%{?rhel} || 0%{?rhel} >= 10 BuildRequires: nodejs >= 18 %endif BuildRequires: make %if 0%{?suse_version} # Suse's package has a different name BuildRequires: appstream-glib %else BuildRequires: libappstream-glib %endif BuildRequires: gettext %if 0%{?rhel} && 0%{?rhel} <= 8 BuildRequires: libappstream-glib-devel %endif %if %{defined rebuild_bundle} BuildRequires: nodejs BuildRequires: nodejs-esbuild %endif Requires: cockpit-bridge Provides: bundled(npm(@patternfly/react-core)) = 6.1.0 Provides: bundled(npm(@patternfly/react-icons)) = 6.1.0 Provides: bundled(npm(@patternfly/react-styles)) = 6.4.0 Provides: bundled(npm(@patternfly/react-tokens)) = 6.4.0 Provides: bundled(npm(focus-trap)) = 7.6.2 Provides: bundled(npm(react)) = 18.3.1 Provides: bundled(npm(react-dom)) = 18.3.1 Provides: bundled(npm(scheduler)) = 0.23.2 Provides: bundled(npm(tabbable)) = 6.3.0 Provides: bundled(npm(tslib)) = 2.8.1 %description Cockpit Starter Kit Example Module %prep %autosetup -n %{name} %if %{defined rebuild_bundle} %setup -q -D -T -a 1 -n cockpit-starter-kit %endif %build %if %{defined rebuild_bundle} rm -rf dist # HACK: node module packaging is currently broken in Fedora, should be in # common location, not major version specific one NODE_ENV=production NODE_PATH=$(echo /usr/lib/node_modules_*) make %else # Use pre-built bundle on distributions without nodejs-esbuild %endif %install %make_install PREFIX=/usr # drop source maps, they are large and just for debugging find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose %check appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* # this can't be meaningfully tested during package build; tests happen through # FMF (see plans/all.fmf) during package gating %files %doc README.md %license LICENSE dist/index.js.LEGAL.txt %{_datadir}/cockpit/* %{_datadir}/metainfo/* %changelog * Mon Nov 17 2025 Packit - 1-1.20251117072207613919.pr1290 - Development snapshot (d929dced)