blob: 46e37f215f5619340840032ba6d20eb4af8062bd [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
Nagaraju Gorugantic1a00af2018-11-07 00:52:11 -060015Requires: python34
Justin Thaler35e3a042018-07-23 18:43:04 -050016Requires: 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
28This 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 -060029It provides key functionality to easily work with the IBM OpenBMC RESTful API, making BMC management easy.
Justin Thaler35e3a042018-07-23 18:43:04 -050030
31#%build
32#%{__make}
33%prep
34%setup -q -n %{name}-%{version}-%{release}
35
36%install
37#rm -rf $RPM_BUILD_ROOT
38export DESTDIR=$RPM_BUILD_ROOT/opt/ibm/ras
39mkdir -p $DESTDIR/bin
40#mkdir -p $DESTDIR/bin/ppc64le
41#mkdir -p $DESTDIR/etc
42mkdir -p $DESTDIR/lib
43#mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system
44cp openbmctool*.py $DESTDIR/bin
45cp *.json $DESTDIR/lib
46
47
48%clean
49rm -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
57ln -s -f /opt/ibm/ras/bin/openbmctool.py /usr/bin/openbmctool
58%changelog