1# Copyright (c) 2017 International Business Machines. All right reserved. 2%define _binaries_in_noarch_packages_terminate_build 0 3Summary: IBM OpenBMC tool 4Name: openbmctool 5Version: %{_version} 6Release: %{_release} 7License: Apache 2.0 8Group: System Environment/Base 9BuildArch: noarch 10URL: http://www.ibm.com/ 11Source0: %{name}-%{version}-%{release}.tgz 12Prefix: /opt 13BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root 14 15Requires: python36 16Requires: python36-requests 17Requires: python36-simplejson 18 19# Turn off the brp-python-bytecompile script 20%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') 21 22%description 23This package is to be applied to any linux machine that will be used to manage or interact with the IBM OpenBMC. 24It provides key functionality to easily work with the IBM OpenBMC RESTful API, making BMC management easy. 25 26%prep 27%setup -q -n %{name} 28 29%install 30export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras 31mkdir -p $DESTDIR/bin 32mkdir -p $DESTDIR/lib 33cp openbmctool*.py $DESTDIR/bin 34cp *.json $DESTDIR/lib 35 36 37%clean 38rm -rf $RPM_BUILD_ROOT 39 40%files 41%attr(775,root,root) /opt/ibm/ras/bin/openbmctool.py 42%attr(664,root,root)/opt/ibm/ras/lib/policyTable.json 43 44%post 45ln -s -f /opt/ibm/ras/bin/openbmctool.py /usr/bin/openbmctool 46%changelog 47