From 44aa1fd4a8efe2a84b29a5320696ef1336c62865 Mon Sep 17 00:00:00 2001 From: Erich Cordoba Date: Sun, 8 Sep 2019 09:27:46 -0500 Subject: [PATCH] Add cgts-client specfile for opensuse Story: 2006508 Task: 36499 Change-Id: Id2d6a7d574422f73205a40b1f40a5d23c8dbe628 Signed-off-by: Erich Cordoba --- .../cgts-client/opensuse/cgts-client.changes | 5 ++ sysinv/cgts-client/opensuse/cgts-client.spec | 65 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 sysinv/cgts-client/opensuse/cgts-client.changes create mode 100644 sysinv/cgts-client/opensuse/cgts-client.spec diff --git a/sysinv/cgts-client/opensuse/cgts-client.changes b/sysinv/cgts-client/opensuse/cgts-client.changes new file mode 100644 index 0000000000..0cb5e89b22 --- /dev/null +++ b/sysinv/cgts-client/opensuse/cgts-client.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed Jun 26 20:18:01 UTC 2019 - Erich Cordoba + +- Add initial commit for cgts-client + diff --git a/sysinv/cgts-client/opensuse/cgts-client.spec b/sysinv/cgts-client/opensuse/cgts-client.spec new file mode 100644 index 0000000000..3f7dccd71b --- /dev/null +++ b/sysinv/cgts-client/opensuse/cgts-client.spec @@ -0,0 +1,65 @@ +Summary: System Client and CLI +Name: cgts-client +Version: 1.0 +Release: 2 +License: Apache-2.0 +Group: System/Base +URL: https://www.starlingx.io +Source0: config-1.0.tar.gz + +BuildRequires: python-setuptools +BuildRequires: python-pbr +BuildRequires: python2-pip +BuildRequires: fdupes +Requires: python-httplib2 +Requires: python-prettytable +Requires: bash-completion +Requires: python-neutronclient +Requires: python-keystoneclient +# Needed for python2 and python3 compatible +Requires: python-six + +%description +System Client and command line interface + +%define local_bindir /usr/bin/ +%define local_etc_bash_completiond /etc/bash_completion.d/ +%define pythonroot /usr/lib64/python2.7/site-packages +%define debug_package %{nil} + +%prep +%setup -n config/sysinv/cgts-client/cgts-client + +# Remove bundled egg-info +rm -rf *.egg-info + +%build +export PBR_VERSION=%{version} +%{__python} setup.py build + +%install +export PBR_VERSION=%{version} +%{__python} setup.py install --root=$RPM_BUILD_ROOT \ + --install-lib=%{pythonroot} \ + --prefix=/usr \ + --install-data=/usr/share \ + --single-version-externally-managed + +install -d -m 755 %{buildroot}%{local_etc_bash_completiond} +install -p -D -m 664 tools/system.bash_completion %{buildroot}%{local_etc_bash_completiond}/system.bash_completion +%fdupes %{buildroot}%{pythonroot}/cgtsclient-1.0-py2.7.egg-info +%fdupes %{buildroot}%{pythonroot}/cgtsclient/ + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc LICENSE +%{local_bindir}/* +%{local_etc_bash_completiond}/* +%{pythonroot}/cgtsclient +%{pythonroot}/cgtsclient-%{version}*.egg-info + +%changelog +