From 93107e83a5a84f225f73c344be222322fd6a97a7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 24 Sep 2019 16:33:15 -0400 Subject: [PATCH] Add a spec template for rpm build The main spec file can be a challenge for some to build. Provide a simplistic spec file with reduced function. Change-Id: Idc295f3eda7b708f0258f8d0934e3fed6a2950d8 --- python-pyghmi.spec.tmpl | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 python-pyghmi.spec.tmpl diff --git a/python-pyghmi.spec.tmpl b/python-pyghmi.spec.tmpl new file mode 100644 index 00000000..383da3a2 --- /dev/null +++ b/python-pyghmi.spec.tmpl @@ -0,0 +1,44 @@ +Summary: Python General Hardware Management Initiative (IPMI and others) +%if "%{rhel}" == "8" +%global sname python2-pyghmi +Requires: python2-cryptography +%else +%global sname python-pyghmi +Requires: python-cryptography +%endif +Name: %sname +version: #VERSION# +Release: %{?release:%{release}}%{!?release:1} +Source0: pyghmi-%{version}.tar.gz +License: Apache License, version 2.0 +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Prefix: %{_prefix} +BuildArch: noarch +Vendor: Jarrod Johnson +Url: https://git.openstack.org/cgit/openstack/pyghmi + + +%description +This is a pure python implementation of IPMI protocol. + +pyghmicons and pyghmiutil are example scripts to show how one may incorporate +this library into python code + + + +%prep +%setup -n pyghmi-%{version} + +%build +python setup.py build + +%install +python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES --prefix=/usr + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f INSTALLED_FILES +%defattr(-,root,root) +