cockpit-tailscale/packaging/cockpit-tailscale.spec.in

56 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2023-06-17 01:06:33 -06:00
Name: cockpit-tailscale
2023-06-17 00:17:53 -06:00
Version: %{VERSION}
Release: 1%{?dist}
2023-06-23 01:55:15 -06:00
Summary: Cockpit Tailscale
2023-06-17 00:17:53 -06:00
License: LGPLv2+
2023-06-17 01:06:33 -06:00
Source0: https://github.com/spotsnel/tailscale-cockpit/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1: https://github.com/spotsnel/tailscale-cockpit/releases/download/%{version}/%{name}-node-%{version}.tar.xz
2023-06-17 00:17:53 -06:00
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs
BuildRequires: make
BuildRequires: libappstream-glib
BuildRequires: gettext
%if 0%{?rhel} && 0%{?rhel} <= 8
BuildRequires: libappstream-glib-devel
%endif
Requires: cockpit-bridge
%{NPM_PROVIDES}
%description
2023-06-23 01:55:15 -06:00
Tailscale management for Cockpit
2023-06-17 00:17:53 -06:00
%prep
%autosetup -n %{name} -a 1
# ignore pre-built bundle in release tarball and rebuild it
# but keep it in RHEL/CentOS-8, as that has a too old nodejs
%if ! 0%{?rhel} || 0%{?rhel} >= 9
rm -rf dist
%endif
%build
ESLINT=0 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
2023-06-23 01:55:15 -06:00
%license LICENSE dist/bundle.js.LICENSE.txt
2023-06-17 00:17:53 -06:00
%{_datadir}/cockpit/*
%{_datadir}/metainfo/*
%changelog