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 |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 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 |
| 22 | 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] | 23 | 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] | 24 | |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 25 | %prep |
Justin Thaler | 0ee11c1 | 2020-02-07 15:36:41 -0600 | [diff] [blame] | 26 | %setup -q -n %{name} |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 27 | |
| 28 | %install |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 29 | export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras |
| 30 | mkdir -p $DESTDIR/bin |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 31 | mkdir -p $DESTDIR/lib |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 32 | cp openbmctool*.py $DESTDIR/bin |
| 33 | cp *.json $DESTDIR/lib |
| 34 | |
| 35 | |
| 36 | %clean |
| 37 | rm -rf $RPM_BUILD_ROOT |
| 38 | |
| 39 | %files |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 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 |
| 44 | ln -s -f /opt/ibm/ras/bin/openbmctool.py /usr/bin/openbmctool |
| 45 | %changelog |