# Used for rpm-packaging of pre-bundled application with already resolved JS dependencies %global _plugindir %{_datarootdir}/cockpit/ %global _ovirtenginedir %{_datarootdir}/ovirt-engine %global product oVirt %global use_rhev %(test -z oVirt && echo 1 || echo 0) %global yarn_install no %define debug_package %{nil} %global source_basename cockpit-ovirt-0.15.0 Name: cockpit-ovirt Version: 0.15.0 Release: 4 Summary: Dashboard for Cockpit based on %{product} License: ASL 2.0 URL: https://gerrit.ovirt.org/gitweb?p=cockpit-ovirt.git;a=summary Source0: http://resources.ovirt.org/pub/src/%{name}/%{source_basename}.tar.gz # nodejs-modules embeds yarn and requires nodejs BuildRequires: ovirt-engine-nodejs-modules >= 2.0.45 %if 0%{?enable_autotools} BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext-devel %endif %package dashboard Summary: Dashboard for Cockpit based on %{product} BuildArch: noarch Requires: cockpit Requires: cockpit-storaged Requires: ovirt-hosted-engine-setup >= 2.5.0 Requires: otopi >= 1.9.0 Requires: ansible %description This package provides a Cockpit dashboard for use with %{product}. %description dashboard This package provides a Cockpit dashboard for use with %{product}. %prep %setup -q -n %{source_basename} %if "%{yarn_install}" == "yes" %{warn:Building the rpm with a yarn online install is dangerous, use of ovirt-engine-nodejs-modules is highly recommended.} %else # Setup yarn and the nodejs-modules via ovirt-engine-nodejs-modules pushd dashboard source %{_datadir}/ovirt-engine-nodejs-modules/setup-env.sh popd %endif %build %if 0%{?enable_autotools} autoreconf -ivf %endif export PATH="%{_datadir}/ovirt-engine-nodejs-modules/bin:${PATH}" %if "%{yarn_install}" == "yes" %configure --with-yarn-install %else %configure %endif make %install make install DESTDIR=%{buildroot} # Create /var/lib/ovirt-hosted-engine-setup/cockpit install -dm 700 %{buildroot}%{_sharedstatedir}/ovirt-hosted-engine-setup/cockpit %files dashboard %doc README.md %license LICENSE %{_plugindir}/ovirt-dashboard %dir %attr(700, root, root) %{_sharedstatedir}/ovirt-hosted-engine-setup/cockpit %changelog * Thu Jun 08 2023 jiangxinyu - 0.15.0-4 - Remove cockpit conf file * Tue May 30 2023 jiangxinyu - 0.15.0-3 - Change require from ansible-2.9 to ansible * Fri Sep 24 2021 wutao - 0.15.0-2 - change ansible to ansible-2.9 * Tue Jul 06 2021 ningjin - 0.15.0-1 - package init