blob: 38ae9c6096c8b7ad8d996319d65e068d7926ae13 [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
Justin Thaler35e3a042018-07-23 18:43:04 -050017
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.
Nagaraju Gorugantic1a00af2018-11-07 00:52:11 -060023It provides key functionality to easily work with the IBM OpenBMC RESTful API, making BMC management easy.
Justin Thaler35e3a042018-07-23 18:43:04 -050024
Justin Thaler35e3a042018-07-23 18:43:04 -050025%prep
Justin Thaler0ee11c12020-02-07 15:36:41 -060026%setup -q -n %{name}
Justin Thaler35e3a042018-07-23 18:43:04 -050027
28%install
Justin Thaler35e3a042018-07-23 18:43:04 -050029export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras
30mkdir -p $DESTDIR/bin
Justin Thaler35e3a042018-07-23 18:43:04 -050031mkdir -p $DESTDIR/lib
Justin Thaler35e3a042018-07-23 18:43:04 -050032cp openbmctool*.py $DESTDIR/bin
33cp *.json $DESTDIR/lib
34
35
36%clean
37rm -rf $RPM_BUILD_ROOT
38
39%files
Justin Thaler35e3a042018-07-23 18:43:04 -050040%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