Files
snmp-armada-app/python-k8sapp-snmp/centos/python-k8sapp-snmp.spec
Gonzalo Gallardo 67e1939509 Upload fm-subagent, fm-trap-subagent and armada plugin.
Upload fm-subagent and fm-trap-subagent to our snmp armada
application integrated with armada plugin.

Change-Id: I2c7b3a65f2e97c147068d0c3c41c52e814bb0e2e
Story: 2008132
Task: 41227
Signed-off-by: Gonzalo Gallardo <gonzalo.gallardo@windriver.com>
2020-11-27 17:00:30 -03:00

62 lines
1.3 KiB
RPMSpec

%global app_name snmp
%global pypi_name k8sapp-snmp
%global sname k8sapp_snmp
Name: python-%{pypi_name}
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: StarlingX sysinv extensions: Snmp
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-setuptools
BuildRequires: python-pbr
BuildRequires: python2-pip
BuildRequires: python2-wheel
%description
StarlingX sysinv extensions: SNMP K8S app
%package -n python2-%{pypi_name}
Summary: StarlingX sysinv extensions: SNMP K8S app
Requires: python-pbr >= 2.0.0
Requires: sysinv >= 1.0
%description -n python2-%{pypi_name}
StarlingX sysinv extensions: SNMP K8S app
%prep
%setup
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
export PBR_VERSION=%{version}
%{__python2} setup.py build
%py2_build_wheel
%install
export PBR_VERSION=%{version}.%{tis_patch_ver}
export SKIP_PIP_INSTALL=1
%{__python2} setup.py install --skip-build --root %{buildroot}
mkdir -p ${RPM_BUILD_ROOT}/plugins/%{app_name}
install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/%{app_name}/
%files
%{python2_sitelib}/%{sname}
%{python2_sitelib}/%{sname}-*.egg-info
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/plugins/*