Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 1 | # Copyright (c) 2017 International Business Machines. All right reserved. |
| 2 | %define _binaries_in_noarch_packages_terminate_build 0 |
| 3 | Summary: IBM OpenBMC tool |
| 4 | Name: openbmctool |
| 5 | Version: %{_version} |
| 6 | Release: %{_release} |
Justin Thaler | d0a8174 | 2019-01-23 11:48:27 -0600 | [diff] [blame] | 7 | License: Apache 2.0 |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 8 | Group: System Environment/Base |
| 9 | BuildArch: noarch |
| 10 | URL: http://www.ibm.com/ |
| 11 | Source0: %{name}-%{version}-%{release}.tgz |
| 12 | Prefix: /opt |
| 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
| 14 | |
Justin Thaler | 0ee11c1 | 2020-02-07 15:36:41 -0600 | [diff] [blame^] | 15 | Requires: python36 |
| 16 | Requires: python36-requests |
| 17 | Requires: python36-simplejson |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 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 |
| 23 | This package is to be applied to any linux machine that will be used to manage or interact with the IBM OpenBMC. |
Nagaraju Goruganti | c1a00af | 2018-11-07 00:52:11 -0600 | [diff] [blame] | 24 | It provides key functionality to easily work with the IBM OpenBMC RESTful API, making BMC management easy. |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 25 | |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 26 | %prep |
Justin Thaler | 0ee11c1 | 2020-02-07 15:36:41 -0600 | [diff] [blame^] | 27 | %setup -q -n %{name} |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 28 | |
| 29 | %install |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 30 | export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras |
| 31 | mkdir -p $DESTDIR/bin |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 32 | mkdir -p $DESTDIR/lib |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 33 | cp openbmctool*.py $DESTDIR/bin |
| 34 | cp *.json $DESTDIR/lib |
| 35 | |
| 36 | |
| 37 | %clean |
| 38 | rm -rf $RPM_BUILD_ROOT |
| 39 | |
| 40 | %files |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 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 |
| 45 | ln -s -f /opt/ibm/ras/bin/openbmctool.py /usr/bin/openbmctool |
| 46 | %changelog |