fault/fm-doc/opensuse/fm-doc.spec

49 lines
1.4 KiB
RPMSpec

%define cgcs_doc_deploy_dir /opt/deploy/cgcs_doc
Name: fm-doc
Version: 1.0.0
Release: stx
Summary: StarlingX Platform Fault Management Documentation Package
License: Apache-2.0
Group: Development/Tools/Other
URL: https://opendev.org/starlingx/fault
Source0: %{name}-%{version}.tar.gz
BuildRequires: fm-api-doc
BuildRequires: fm-common-doc
BuildRequires: python-yaml
BuildArch: noarch
%description
A yaml file description of the StarlingX Alarms and Customer Logs generated by
the StarlingX Cloud System. Also included and used at build time is a simple syntax
checker to ensure no duplicate IDs are used, and generally the correct
field values are documented.
%prep
%autosetup -n %{name}-%{version}/fm_doc
%build
%install
CGCS_DOC_DEPLOY=%{buildroot}/%{cgcs_doc_deploy_dir}
install -d $CGCS_DOC_DEPLOY
install -D -d %{buildroot}/%{_sysconfdir}/fm/
install -m 644 events.yaml %{buildroot}/%{_sysconfdir}/fm/
install -m 644 events.yaml $CGCS_DOC_DEPLOY
install -m 755 checkEventYaml $CGCS_DOC_DEPLOY
install -m 644 parseEventYaml.py $CGCS_DOC_DEPLOY
install -m 755 check_missing_alarms.py $CGCS_DOC_DEPLOY
pushd $CGCS_DOC_DEPLOY
cp %{cgcs_doc_deploy_dir}/constants.py %{cgcs_doc_deploy_dir}/fmAlarm.h .
./checkEventYaml
rm constants.py* fmAlarm.h*
popd
%files
%defattr(-,root,root,-)
%license LICENSE
%{cgcs_doc_deploy_dir}/*
%dir %{_sysconfdir}/fm
%config %{_sysconfdir}/fm/events.yaml
%changelog