Create makefile for remote-clients

Story: 2004043
Task: 27553

Change-Id: Ibfc33a7d66beefe7be9e13e2dc3cbd590ed318e9
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
This commit is contained in:
Erich Cordoba 2019-01-29 12:03:10 -06:00
parent c4c4191a91
commit 4c8bcf1d3e
2 changed files with 26 additions and 6 deletions

View File

@ -28,21 +28,24 @@ BuildRequires: python-fmclient-sdk
%define cgcs_sdk_deploy_dir /opt/deploy/cgcs_sdk
%define remote_client_dir /usr/share/remote-clients
%global debug_package %{nil}
%description
Remote-Client files
%prep
%setup
mv %{name} wrs-%{name}-%{version}
find %{remote_client_dir} -name "*.tgz" -exec cp '{}' wrs-%{name}-%{version}/ \;
sed -i 's/xxxVERSIONxxx/%{version}/g' wrs-%{name}-%{version}/README
tar czf wrs-%{name}-%{version}.tgz wrs-%{name}-%{version}
%build
make NAME=%{name} \
VERSION=%{version} \
REMOTE_CLIENT_DIR=%{remote_client_dir}
# Install for guest-client package
%install
install -D -m 644 wrs-%{name}-%{version}.tgz %{buildroot}%{cgcs_sdk_deploy_dir}/wrs-%{name}-%{version}.tgz
make install NAME=%{name} \
VERSION=%{version} \
SDK_DEPLOY_DIR=%{buildroot}%{cgcs_sdk_deploy_dir}
%files
%{cgcs_sdk_deploy_dir}/wrs-%{name}-%{version}.tgz

View File

@ -0,0 +1,17 @@
#
# SPDX-License-Identifier: Apache-2.0
#
NAME ?= remote-clients
VERSION ?= 2.0.6
REMOTE_CLIENT_DIR ?= /usr/share/remote-clients
SDK_DEPLOY_DIR ?= /opt/deploy/cgcs_sdk
all:
mv $(NAME) wrs-$(NAME)-$(VERSION)
find $(REMOTE_CLIENT_DIR) -name "*.tgz" -exec cp '{}' wrs-$(NAME)-$(VERSION)/ \;
sed -i 's/xxxVERSIONxxx/$(VERSION)/g' wrs-$(NAME)-$(VERSION)/README
tar czf wrs-$(NAME)-$(VERSION).tgz wrs-$(NAME)-$(VERSION)
install:
install -D -m 644 wrs-$(NAME)-$(VERSION).tgz $(SDK_DEPLOY_DIR)/wrs-$(NAME)-$(VERSION).tgz