Create makefile for storageconfig

Story: 2004043
Task: 27547

Change-Id: I014f62fcb0a888da0c42e737c4512d5f9604ad3d
Signed-off-by: erich <erich.cordoba.malibran@intel.com>
This commit is contained in:
Erich Cordoba 2019-01-31 13:31:35 -06:00
parent be32c25498
commit 35e13285de
2 changed files with 21 additions and 13 deletions

View File

@ -15,7 +15,6 @@ Initial storage node configuration
%define local_etc_initd /etc/init.d/
%define local_etc_goenabledd /etc/goenabled.d/
%define local_etc_systemd /etc/systemd/system/
%define debug_package %{nil}
@ -25,16 +24,10 @@ Initial storage node configuration
%build
%install
install -d -m 755 %{buildroot}%{local_etc_initd}
install -p -D -m 700 storage_config %{buildroot}%{local_etc_initd}/storage_config
install -d -m 755 %{buildroot}%{local_etc_goenabledd}
install -p -D -m 755 config_goenabled_check.sh %{buildroot}%{local_etc_goenabledd}/config_goenabled_check.sh
install -d -m 755 %{buildroot}%{local_etc_systemd}
install -p -D -m 664 storageconfig.service %{buildroot}%{local_etc_systemd}/storageconfig.service
#install -p -D -m 664 config.service %{buildroot}%{local_etc_systemd}/config.service
make install \
INITDDIR=%{buildroot}%{local_etc_initd} \
GOENABLEDDIR=%{buildroot}%{local_etc_goenabledd} \
SYSTEMDDIR=%{buildroot}%{_unitdir}
%post
systemctl enable storageconfig.service
@ -48,11 +41,11 @@ systemctl enable storageconfig.service
# update-rc.d $OPT storage_config defaults 60
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE
%{local_etc_initd}/*
%{local_etc_goenabledd}/*
%{local_etc_systemd}/*
%{_unitdir}/*

View File

@ -0,0 +1,15 @@
#
# SPDX-License-Identifier: Apache-2.0
#
INITDDIR ?= /etc/init.d/
GOENABLEDDIR ?= /etc/goenabled.d/
SYSTEMDDIR ?= /etc/systemd/system/
install:
install -d -m 755 $(INITDDIR)
install -p -D -m 700 storage_config $(INITDDIR)/storage_config
install -d -m 755 $(GOENABLEDDIR)
install -p -D -m 755 config_goenabled_check.sh $(GOENABLEDDIR)/config_goenabled_check.sh
install -d -m 755 $(SYSTEMDDIR)
install -p -D -m 664 storageconfig.service $(SYSTEMDDIR)/storageconfig.service