File cockpit-files.spec of Package cockpit-files
#
# spec file for package cockpit-files
#
# Copyright (c) 2026 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.
Name: cockpit-files
Version: 37
Release: 0
Summary: A featureful file browser for Cockpit
License: LGPL-2.1-or-later
Group: System/Management
URL: https://github.com/cockpit-project/cockpit-files
Source0: %{name}-%{version}.tar.xz
# Since is only JavaScript/TypeScript code, there is no specific arch needed
BuildArch: noarch
# Build dependencies
BuildRequires: make
BuildRequires: gettext
BuildRequires: appstream-glib
# Node.js >= 18 is required as described in package.json
BuildRequires: nodejs >= 18
BuildRequires: npm
BuildRequires: fdupes
# Runtime Dependencies
Requires: cockpit >= 251
Requires: cockpit-bridge >= 318
Provides: %{name} = %{version}
# Provides the same functionality of cockpit-navigator
Provides: cockpit-navigator = %{version}
# Replaces the obsolete cockpit-navigator from 45Drives and older versions of cockpit-files
Obsoletes: cockpit-navigator < 0.5.11
Obsoletes: %{name} < %{version}
%description
Cockpit Files is a featureful file browser for the Cockpit web console.
It provides an intuitive interface for managing files and directories
on the system, with support for common file operations, permissions
management, and more.
This is a modernized and actively maintained version of the former
cockpit-navigator plugin.
%prep
%autosetup -p1 -n %{name}
%build
# Nothing
%install
%make_install PREFIX=%{_prefix}
# Delete source maps (debugging)
find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose
# Install the license file to the proper location
install -d -m 755 %{buildroot}%{_licensedir}/cockpit-files
install -m 644 dist/index.js.LEGAL.txt %{buildroot}%{_licensedir}/cockpit-files/
# Remove duplicated files
%fdupes %{buildroot}
%check
# Validate metainfo file of AppStream
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*
%files
%license LICENSE dist/index.js.LEGAL.txt
%doc README.md
%{_datadir}/cockpit/
%{_datadir}/metainfo/*
%changelog