File cockpit-files.spec of Package cockpit-files
#
# spec file for package cockpit-packages
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: cockpit-files
Version: 20
Release: 1%{?dist}
Summary: A filesystem browser for Cockpit
License: LGPL-2.1-or-later
Source0: https://github.com/cockpit-project/cockpit-files/releases/download/%{version}/%{name}-%{version}.tar.xz
BuildArch: noarch
BuildRequires: nodejs
BuildRequires: make
%if 0%{?suse_version}
# Suse's package has a different name
BuildRequires: appstream-glib
%else
BuildRequires: libappstream-glib
%endif
BuildRequires: gettext
Requires: cockpit-bridge >= 318
# Replace the older cockpit-navigator provided by 45Drives
Obsoletes: cockpit-navigator < 0.5.11
%description
A filesystem browser for Cockpit
%prep
%setup -q -n %{name}
%build
# Nothing to build
%install
PREFIX=/usr DESTDIR=%{buildroot} make install
# 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