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 17 18# Turn off the brp-python-bytecompile script 19%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') 20 21%description 22This package is to be applied to any linux machine that will be used to manage or interact with the IBM OpenBMC. 23It provides key functionality to easily work with the IBM OpenBMC RESTful API, making BMC management easy. 24 25%prep 26%setup -q -n %{name} 27 28%install 29export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras 30mkdir -p $DESTDIR/bin 31mkdir -p $DESTDIR/lib 32cp openbmctool*.py $DESTDIR/bin 33cp *.json $DESTDIR/lib 34 35 36%clean 37rm -rf $RPM_BUILD_ROOT 38 39%files 40%attr(775,root,root) /opt/ibm/ras/bin/openbmctool.py 41%attr(664,root,root)/opt/ibm/ras/lib/policyTable.json 42 43%post 44ln -s -f /opt/ibm/ras/bin/openbmctool.py /usr/bin/openbmctool 45%changelog 46