🏡 index : quine-global/quine-anaconda-webui.git

Name:           anaconda-webui
Version:        %{VERSION}
Release:        1%{?dist}
Summary:        Anaconda installer Web interface
License:        LGPL-2.1-or-later AND MIT
URL:            https://github.com/rhinstaller/%{name}

Source0:        https://github.com/rhinstaller/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
BuildArch:      noarch
BuildRequires:  libappstream-glib
BuildRequires:  make
BuildRequires:  gettext
# Needed for the unitdir macro
BuildRequires: systemd-rpm-macros

%global anacondacorever 0

%if 0%{?fedora} > 41
%global anacondacorever 42.5
%endif

%global webui_slitherer_spin_identities fedora-release-identity-budgie or fedora-release-identity-cinnamon or fedora-release-identity-kde-desktop or fedora-release-identity-kde-mobile or fedora-release-identity-lxde or fedora-release-identity-lxqt or fedora-release-identity-matecompiz or fedora-release-identity-soas or fedora-release-identity-sway or fedora-release-identity-xfce or fedora-release-identity-i3

%global cockpitver 275

%define _unitdir /usr/lib/systemd/system

Requires: cockpit-storaged
Requires: cockpit-networkmanager
Requires: cockpit-bridge >= %{cockpitver}
Requires: cockpit-ws >= %{cockpitver}
Requires: anaconda-core  >= %{anacondacorever}
Requires: python3-bugzilla
# Firefox dependency needs to be specified there as cockpit web-view does not have a hard dependency on Firefox as
# it can often fall back to a diferent browser. This does not work in the limited installer
# environment, so we need to make sure Firefox is available. Exclude on RHEL, only Flatpak version will be there.
%if ! 0%{?rhel}
Requires: (slitherer if (%{webui_slitherer_spin_identities}) else firefox)
%endif
%if 0%{?fedora}
Requires: system-logos
%endif
BuildRequires: desktop-file-utils

%{NPM_PROVIDES}

%description
Anaconda installer Web interface

%prep
%setup -q -n %{name}

%build
# Nothing to build

%install
%make_install PREFIX=/usr

desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/extlinks.desktop
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/anaconda-gnome-control-center.desktop

%check
exit 0
# We have some integration tests, but those require running a VM, so that would
# be an overkill for RPM check script.

%files
%dir %{_datadir}/cockpit/anaconda-webui
%doc README.rst
%license LICENSE dist/index.js.LEGAL.txt dist/anacondaLogin.js.LEGAL.txt
%{_datadir}/cockpit/anaconda-webui/login.html
%{_datadir}/cockpit/anaconda-webui/anacondaLogin.js
%{_datadir}/cockpit/anaconda-webui/anacondaLogin.js.map
%{_datadir}/cockpit/anaconda-webui/anacondaLogin.js.LEGAL.txt
%{_datadir}/cockpit/anaconda-webui/anacondaLogin.css
%{_datadir}/cockpit/anaconda-webui/anacondaLogin.css.map
%{_datadir}/cockpit/anaconda-webui/qr-code-feedback.svg
%{_datadir}/cockpit/anaconda-webui/index.js.LEGAL.txt
%{_datadir}/cockpit/anaconda-webui/index.html
%{_datadir}/cockpit/anaconda-webui/index.js.gz
%{_datadir}/cockpit/anaconda-webui/index.js.map
%{_datadir}/cockpit/anaconda-webui/index.css.gz
%{_datadir}/cockpit/anaconda-webui/index.css.map
%{_datadir}/cockpit/anaconda-webui/manifest.json
%{_datadir}/cockpit/anaconda-webui/po.*.js.gz
%{_datadir}/cockpit/anaconda-webui/VERSION.txt
%{_libexecdir}/anaconda/cockpit-coproc-wrapper.sh
%{_libexecdir}/anaconda/anaconda-cockpit-conf-merge
%dir /etc/anaconda/cockpit
%config(noreplace) /etc/anaconda/cockpit/cockpit.conf
%dir /etc/anaconda/cockpit/conf.d
%dir %{_datadir}/anaconda/cockpit
%dir %{_datadir}/anaconda/cockpit/conf.d
%{_datadir}/anaconda/cockpit/conf.d/50-remote-auth.conf
%{_libexecdir}/anaconda/cockpit-pin-auth
%dir %{_datadir}/anaconda/firefox-theme
%dir %{_datadir}/anaconda/firefox-theme/default
%dir %{_datadir}/anaconda/firefox-theme/default/chrome
%{_datadir}/anaconda/firefox-theme/default/user.js
%{_datadir}/anaconda/firefox-theme/default/chrome/userChrome.css
%dir %{_datadir}/anaconda/firefox-theme/live
%dir %{_datadir}/anaconda/firefox-theme/live/chrome
%{_datadir}/anaconda/firefox-theme/live/user.js
%{_datadir}/anaconda/firefox-theme/live/chrome/userChrome.css
%dir %{_datadir}/anaconda/firefox-theme/extlink
%{_datadir}/anaconda/firefox-theme/extlink/user.js
%{_libexecdir}/anaconda/webui-desktop
%{_libexecdir}/anaconda/browser-ext
%{_libexecdir}/anaconda/gnome-control-center-ext
%{_datadir}/applications/extlinks.desktop
%{_datadir}/applications/anaconda-gnome-control-center.desktop
%{_unitdir}/webui-cockpit-ws.service
%{_unitdir}/cockpit-pin-auth.socket
%{_unitdir}/cockpit-pin-auth@.service
%{_unitdir}/webui-tls-proxy.service
%{_libexecdir}/anaconda/webui-tls-proxy


# The changelog is automatically generated and merged
%changelog