File ipmiview.spec of Package ipmiview

#
# spec file for package IPMIView
#

Name:           ipmiview
Version:        2.23.0
Release:        0
License:        Apache-2.0
Summary:        A GUI-based IMPI viewer through BMC
Url:            https://www.supermicro.com/products/nfo/SMS_IPMI.cfm
Group:          System/X11/Utilities
Source:         ipmiview_2.23.0.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       java >= 1.8.0
ExclusiveArch:  x86_64

%description
IPMIView is a GUI-based software application that allows administrators to manage multiple target systems through BMC. IPMIView V2.0 supports Supermicro’s BMCs that adheres to either IPMI v1.5 or v2.0.
IPMIView monitors and reports on the status of a SuperBlade® system, including the blade server, power supply, gigabit switch, InfiniBand and CMM modules. IPMIView also supports remote KVM and Virtual Media.
IPMIView Key Features:
      - IPMI System Management
      - KVM Console Redirection
      - Text Console Redirection
      - Virtual Media Management
      - IPMI User/Group Management
      - Trap Receiver
      - Mobile App (Android, iOS) 

%global debug_package %{nil}
%prep
%setup -q -n ipmiview

%build
tar xvfz IPMIView_%{version}_build.250519_bundleJRE_Linux_x64.tar.gz

cat << EOF > %{name}.sh
#!/bin/bash
%{_bindir}/java -jar %{_libdir}/%{name}/IPMIView20.jar
EOF

cat << EOF > ikvm.sh
#!/bin/bash

if [ "$3" == "" ];
then
	echo "Usage: $0 <ip> <username> <password>"
	exit
fi;

%{_bindir}/java -Djava.library.path=%{_libdir}/%{name}/ -jar %{_libdir}/%{name}/iKVM.jar "$1" "$2" "$3" null 5900 623 2 0 >/dev/null
EOF

cat << EOF > %{name}.desktop
[Desktop Entry]
Name=IPMIView
GenericName=Supermicro IPMIview
Comment=IPMIView is a GUI-based software application that allows administrators to manage multiple target systems through BMC.
Exec=%{_bindir}/%{name}
Terminal=false
Type=Application
Icon=%{_libdir}/%{name}/ipmiview.ico
Categories=Network;RemoteAccess;
Keywords=IPMIView;BMC;Supermicro;
EOF

%install
mkdir -p %{buildroot}%{_libdir}
cp -a ./IPMIView_%{version}_build.250519_bundleJRE_Linux_x64/ %{buildroot}%{_libdir}/%{name}
install -m 0755 %{name}.sh %{buildroot}%{_libdir}/%{name}
install -m 0755 ikvm.sh %{buildroot}%{_libdir}/%{name}
install -m 644 %{name}.ico %{buildroot}%{_libdir}/%{name}
mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{name}.desktop %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_bindir}

%post
ln -sf %{_libdir}/%{name}/%{name}.sh %{_bindir}/%{name}
ln -sf %{_libdir}/%{name}/ikvm.sh %{_bindir}/ikvm
/sbin/ldconfig

# Setup desktop file
if command -v update-desktop-database >/dev/null 2>&1; then
  update-desktop-database -q /usr/share/applications 2>/dev/null ||:
fi

%postun
/sbin/ldconfig

%files
%defattr(-,root,root)
%doc
%{_libdir}/%{name}
%{_datadir}/applications/ipmiview.desktop
%changelog
* Tue Sep 23 2025 Mistific@tor - 2.23.0
- Package: IPMIView_2.23.0_build.250519_bundleJRE_Linux_x64
* Thu Feb 29 2024 Mistific@tor - 2.21.1
- Package: IPMIView_2.21.1_build.230720_bundleJRE_Linux_x64
* Thu Dec 24 2020 Mistific@tor - 2.18.0
- Package: IPMIView_2.18.0_build.201007_bundleJRE_Linux_x64
* Mon Sep 07 2020 Mistific@tor - 2.17.0
- Package: IPMIView_2.17.0_build.200505_bundleJRE_Linux_x64
* Sat Sep 07 2019 Mistific@tor - 2.16.0
- Package: IPMIView_2.16.0_build.190528_bundleJRE_Linux_x64
openSUSE Build Service is sponsored by