starter-kit/packaging/cockpit-starter-kit.spec.in
Pino Toscano e3f668b584 spec: use %autosetup
Replace the two %setup calls with %autosetup; the second call was even
redoing the first.

Reported by Neal Gompa, thanks!
2022-05-12 16:43:56 +02:00

52 lines
1.3 KiB
RPMSpec

Name: cockpit-starter-kit
Version: %{VERSION}
Release: 1%{?dist}
Summary: Cockpit Starter Kit Example Module
License: LGPLv2+
Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
%if 0%{?fedora}
BuildRequires: nodejs-devel
%endif
BuildRequires: nodejs
BuildRequires: make
BuildRequires: libappstream-glib
BuildRequires: gettext
%if 0%{?rhel} && 0%{?rhel} <= 8
BuildRequires: libappstream-glib-devel
%endif
Requires: cockpit-system
%description
Cockpit Starter Kit Example Module
%prep
%autosetup -n %{name} -a 1
# ignore pre-built webpack in release tarball and rebuild it
rm -rf dist
%build
ESLINT=0 NODE_ENV=production make
%install
%make_install
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*
# drop source maps, they are large and just for debugging
find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose
%check
# 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.LICENSE.txt.gz
%{_datadir}/cockpit/*
%{_datadir}/metainfo/*
%changelog