File cockpit-subscriptions.spec of Package cockpit-subscriptions
Name: cockpit-subscriptions
Version: 1
Release: 1%{?dist}
Summary: Cockpit module for managing and registering subscriptions
License: LGPL-2.1-or-later
Source0: ./cockpit-subscriptions-%{version}.tar.gz
BuildArch: noarch
BuildRequires: local-npm-registry
BuildRequires: nodejs >= 18
BuildRequires: make
BuildRequires: appstream-glib
BuildRequires: gettext
Requires: cockpit-bridge
%description
A Cockpit module for managing and registering subscriptions
%prep
%autosetup
rm -f package-lock.json
local-npm-registry %{_sourcedir} install --include=dev --ignore-scripts
%build
NODE_ENV=production make
%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
%{_datadir}/cockpit
%{_datadir}/metainfo/*
%changelog