Stardardize makefile for fm-mgr
The install target was changed as well as the variables provided to the makefile. Story: 2004043 Task: 27544 Change-Id: Id932e2c5cc15be1244c39158b62e6f6f74ce20bc Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
This commit is contained in:
parent
aebc9ee1fa
commit
81dccc9b83
@ -16,7 +16,7 @@ BuildRequires: libuuid-devel
|
||||
|
||||
%description
|
||||
CGTS platform Fault Manager that serves the client
|
||||
application fault management requests and raise/clear/update
|
||||
application fault management requests and raise/clear/update
|
||||
alarms in the active alarm database.
|
||||
|
||||
%prep
|
||||
@ -29,14 +29,19 @@ MINOR=`echo $VER | awk -F . '{print $2}'`
|
||||
make MAJOR=$MAJOR MINOR=$MINOR %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
VER=%{version}
|
||||
MAJOR=`echo $VER | awk -F . '{print $1}'`
|
||||
MINOR=`echo $VER | awk -F . '{print $2}'`
|
||||
make DEST_DIR=$RPM_BUILD_ROOT BIN_DIR=%{local_bindir} LIB_DIR=%{_libdir} INC_DIR=%{_includedir} MAJOR=$MAJOR MINOR=$MINOR install_non_bb
|
||||
make DESTDIR=%{buildroot} \
|
||||
BINDIR=%{local_bindir} \
|
||||
SYSCONFDIR=%{_sysconfdir} \
|
||||
UNITDIR=%{_unitdir} \
|
||||
MAJOR=$MAJOR MINOR=$MINOR \
|
||||
install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
@ -46,4 +51,3 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%_sysconfdir/init.d/fminit
|
||||
%{_unitdir}/fminit.service
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/fm.logrotate
|
||||
|
||||
|
@ -1,10 +1,19 @@
|
||||
SRCS = fm_main.cpp
|
||||
OBJS = fm_main.o
|
||||
SRCS = fm_main.cpp
|
||||
OBJS = fm_main.o
|
||||
|
||||
OBJS = $(SRCS:.cpp=.o)
|
||||
INCLUDES = -I.
|
||||
CCFLAGS = -g -O2 -Wall -Werror
|
||||
|
||||
MAJOR ?= 1
|
||||
MINOR ?= 0
|
||||
|
||||
DESTDIR ?= /
|
||||
BINDIR ?= /usr/local/bin
|
||||
SYSCONFDIR ?= /etc
|
||||
UNITDIR ?= /usr/lib/systemd/system
|
||||
|
||||
|
||||
build: fmManager
|
||||
|
||||
.cpp.o:
|
||||
@ -16,14 +25,13 @@ fmManager: $(OBJS)
|
||||
clean:
|
||||
@rm -f $(OBJS)
|
||||
|
||||
install_non_bb:
|
||||
mkdir -p $(DEST_DIR)/usr/lib/systemd/system
|
||||
install -m 755 -d $(DEST_DIR)/etc
|
||||
install -m 755 -d $(DEST_DIR)/etc/init.d
|
||||
install -m 755 -d $(DEST_DIR)/etc/logrotate.d
|
||||
install -m 755 -d $(DEST_DIR)/usr/local
|
||||
install -m 755 -d $(DEST_DIR)/usr/local/bin
|
||||
install -m 755 fminit $(DEST_DIR)/etc/init.d/fminit
|
||||
install -m 755 fmManager $(DEST_DIR)/usr/local/bin/fmManager
|
||||
install -m 644 fm.logrotate $(DEST_DIR)/etc/logrotate.d/fm.logrotate
|
||||
install -m 644 fminit.service $(DEST_DIR)/usr/lib/systemd/system/fminit.service
|
||||
install:
|
||||
mkdir -p $(DESTDIR)/usr/lib/systemd/system
|
||||
install -m 755 -d $(DESTDIR)$(SYSCONFDIR)
|
||||
install -m 755 -d $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||
install -m 755 -d $(DESTDIR)$(SYSCONFDIR)/logrotate.d
|
||||
install -m 755 -d $(DESTDIR)$(BINDIR)
|
||||
install -m 755 fminit $(DESTDIR)$(SYSCONFDIR)/init.d/fminit
|
||||
install -m 755 fmManager $(DESTDIR)$(BINDIR)/fmManager
|
||||
install -m 644 fm.logrotate $(DESTDIR)$(SYSCONFDIR)/logrotate.d/fm.logrotate
|
||||
install -m 644 fminit.service $(DESTDIR)$(UNITDIR)/fminit.service
|
||||
|
Loading…
x
Reference in New Issue
Block a user