blob: 77692231b8a8c3ea35f380df2dc6e93aa32b795f [file] [log] [blame]
Justin Thaler35e3a042018-07-23 18:43:04 -05001# 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}
Justin Thalerd0a81742019-01-23 11:48:27 -06007License: Apache 2.0
Justin Thaler35e3a042018-07-23 18:43:04 -05008Group: System Environment/Base
9BuildArch: noarch
10URL: http://www.ibm.com/
11Source0: %{name}-%{version}-%{release}.tgz
12Prefix: /opt
13BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
14
Justin Thaler0ee11c12020-02-07 15:36:41 -060015Requires: python36
16Requires: python36-requests
17Requires: python36-simplejson
Justin Thaler35e3a042018-07-23 18:43:04 -050018
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.
Nagaraju Gorugantic1a00af2018-11-07 00:52:11 -060024It provides key functionality to easily work with the IBM OpenBMC RESTful API, making BMC management easy.
Justin Thaler35e3a042018-07-23 18:43:04 -050025
Justin Thaler35e3a042018-07-23 18:43:04 -050026%prep
Justin Thaler0ee11c12020-02-07 15:36:41 -060027%setup -q -n %{name}
Justin Thaler35e3a042018-07-23 18:43:04 -050028
29%install
Justin Thaler35e3a042018-07-23 18:43:04 -050030export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras
31mkdir -p $DESTDIR/bin
Justin Thaler35e3a042018-07-23 18:43:04 -050032mkdir -p $DESTDIR/lib
Justin Thaler35e3a042018-07-23 18:43:04 -050033cp openbmctool*.py $DESTDIR/bin
34cp *.json $DESTDIR/lib
35
36
37%clean
38rm -rf $RPM_BUILD_ROOT
39
40%files
Justin Thaler35e3a042018-07-23 18:43:04 -050041%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