fault/fm-mgr/centos/fm-mgr.spec
Dan Voiculeasa be2ceec7a9 Rework fm-mgr Makefile and spec
Move service installation out of the Makefile.
This will let Debian build system control the service installation.

Test on CentOS:
PASS: build-pkgs && build-iso
PASS: install iso & fminit service exists
PASS: bootstrap & unlock

Story: 2009101
Task: 44321
Change-Id: I244c078b19fb0817fcd9ac3c2b026a32024dd1c9
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
2022-04-09 16:32:24 +00:00

57 lines
1.3 KiB
RPMSpec

%define local_dir /usr/local
%define local_bindir %{local_dir}/bin
Summary: CGTS Platform Fault Manager Package
Name: fm-mgr
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
BuildRequires: fm-common-dev
BuildRequires: systemd-devel
BuildRequires: libuuid-devel
Requires: logrotate
%description
CGTS platform Fault Manager that serves the client
application fault management requests and raise/clear/update
alarms in the active alarm database.
%prep
%setup
%build
VER=%{version}
MAJOR=`echo $VER | awk -F . '{print $1}'`
MINOR=`echo $VER | awk -F . '{print $2}'`
make MAJOR=$MAJOR MINOR=$MINOR %{?_smp_mflags}
%install
rm -rf %{buildroot}
VER=%{version}
MAJOR=`echo $VER | awk -F . '{print $1}'`
MINOR=`echo $VER | awk -F . '{print $2}'`
make DESTDIR=%{buildroot} \
BINDIR=%{local_bindir} \
SYSCONFDIR=%{_sysconfdir} \
UNITDIR=%{_unitdir} \
MAJOR=$MAJOR MINOR=$MINOR \
install
install -m 644 fminit.service %{buildroot}%{_unitdir}/fminit.service
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE
%{local_bindir}/fmManager
%_sysconfdir/init.d/fminit
%{_unitdir}/fminit.service
%config(noreplace) %{_sysconfdir}/logrotate.d/fm.logrotate