File ardana-opsconsole-ui.spec of Package ardana-opsconsole-ui

#
# spec file
#
# Copyright (c) 2023 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/
#


%if "@BUILD_FLAVOR@" == ""
%define hpe_theme 0
%define name_ext %nil
%else
%define hpe_theme 1
%define name_ext -hpe
%endif

%define version_unconverted 8.0+git.1537201508.68c32e6

Name:           ardana-opsconsole-ui%{name_ext}
Version:        8.0+git.1537201508.68c32e6
Release:        0
Summary:        Ardana Opsconsole UI Implementation
License:        Apache-2.0
Group:          System/Management
URL:            https://github.com/ArdanaCLM/opsconsole-ui
Source0:        ardana-opsconsole-ui-%{version}.tar
Source1:        node_modules.tar.bz2
Source2:        bower_components.tar.bz2
%if %{hpe_theme}
# branding images for hpe in a bz2 file since patch doesnt
# handle binaries well
# PATCH-FEATURE-OEM 0001-HPE-branding-patch-for-Ops-Console.patch supports OEM of product to HPE
# PATCH-FEATURE-OEM 0001-HPE-branding-patch-for-Ops-Console.patch jmoffitt@suse.com
Source3:        opsconsole_ui_hpe_branding_binaries.tar.bz2
NoSource:       3
# patch file with the css and other changes for branding
Patch1:         0001-HPE-branding-patch-for-Ops-Console.patch
Provides:       ardana-opsconsole-ui = %{version}
%endif
BuildRequires:  git-core
BuildRequires:  nodejs6
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
%ardana_description
This is the Ardana Opsconsole UI Implementation

%prep
%setup -q -n ardana-opsconsole-ui-%{version} -a 1 -a 2
%if 0%{hpe_theme}
%setup -q -n ardana-opsconsole-ui-%{version} -T -D -a 3
%patch1 -p1
%endif

%build
./node_modules/gulp/bin/gulp.js dist

%install
install -d -m 755 %{buildroot}%{_datadir}/ardana-opsconsole-ui
for subdir in dist.stdcfg/*; do
  cp -a $subdir %{buildroot}%{_datadir}/ardana-opsconsole-ui/
done

%files
%defattr(-,root,root,-)
%doc LICENSE
%{_datadir}/ardana-opsconsole-ui

%changelog
openSUSE Build Service is sponsored by