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 | |
Nagaraju Goruganti | c1a00af | 2018-11-07 00:52:11 -0600 | [diff] [blame] | 15 | Requires: python34 |
Justin Thaler | 35e3a04 | 2018-07-23 18:43:04 -0500 | [diff] [blame] | 16 | Requires: python34-requests |
| 17 | |
| 18 | #%if 0%{?_unitdir:1} |
| 19 | #Requires(post): systemd-units |
| 20 | #Requires(preun): systemd-units |
| 21 | #Requires(postun): systemd-units |
| 22 | #%endif |
| 23 | |
| 24 | # Turn off the brp-python-bytecompile script |
| 25 | %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') |
| 26 | |
| 27 | %description |
| 28 | 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] | 29 | 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] | 30 | |
| 31 | #%build |
| 32 | #%{__make} |
| 33 | %prep |
| 34 | %setup -q -n %{name}-%{version}-%{release} |
| 35 | |
| 36 | %install |
| 37 | #rm -rf $RPM_BUILD_ROOT |
| 38 | export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras |
| 39 | mkdir -p $DESTDIR/bin |
| 40 | #mkdir -p $DESTDIR/bin/ppc64le |
| 41 | #mkdir -p $DESTDIR/etc |
| 42 | mkdir -p $DESTDIR/lib |
| 43 | #mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system |
| 44 | cp openbmctool*.py $DESTDIR/bin |
| 45 | cp *.json $DESTDIR/lib |
| 46 | |
| 47 | |
| 48 | %clean |
| 49 | rm -rf $RPM_BUILD_ROOT |
| 50 | |
| 51 | %files |
| 52 | #%defattr(-,root,root,-) |
| 53 | %attr(775,root,root) /opt/ibm/ras/bin/openbmctool.py |
| 54 | %attr(664,root,root)/opt/ibm/ras/lib/policyTable.json |
| 55 | |
| 56 | %post |
| 57 | ln -s -f /opt/ibm/ras/bin/openbmctool.py /usr/bin/openbmctool |
| 58 | %changelog |