File ibmrtpkgs.spec of Package ibmrtpkgs
#
# spec file for package ibmrtpkgs
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ibmrtpkgs
Url: http://www10.software.ibm.com/developerworks/opensource/linux390
Summary: IBM Utilities for SLERT
Version: 2
Release: 6.<RELEASE36>
PreReq: %insserv_prereq %fillup_prereq OpenIPMI
License: GPL-2.0
Group: System/Management
Source: ibmrtpkgs-%{version}.tar.gz
Requires: ipmitool
Patch1: kthreadprio_defaults-bnc415750.diff
Patch2: kthreadprio_autostart-bnc412439.diff
Patch3: update_rtcheck_to_devel-bnc623542.diff
Patch4: set_nfs_to_rt_per_ibm_testing.diff
Patch5: make_init_lsb.diff
Patch6: config_run_on_install.diff
Patch7: correct-nice-for-realtime-bnc464343.patch
Patch8: kthreadprio_defaults-bnc633514.diff
Patch9: update_var_directory_usage-bnc714625.diff
Patch10: irqbindall_cosmetic_fix-bnc703490.diff
AutoReqProv: yes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A collection of utilities supplied by IBM to create a real time
environment primarily for RT WebSphere applications deployed on SLERT.
Also contains a utility called ibm-prtm that removes latencies seen
when running SLERT on IBM hardware due to SMI interrupts.
Authors:
--------
IBM
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%build
export OPT_FLAGS="$RPM_OPT_FLAGS"
cd $RPM_BUILD_DIR/ibmrtpkgs-2
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/etc/modprobe.d $RPM_BUILD_ROOT/sbin $RPM_BUILD_ROOT/usr/sbin
install $RPM_BUILD_DIR/ibmrtpkgs-2/config/config.sh $RPM_BUILD_ROOT/usr/sbin/ibmconfig
install $RPM_BUILD_DIR/ibmrtpkgs-2/dslimit/dslimit $RPM_BUILD_ROOT/usr/bin
install $RPM_BUILD_DIR/ibmrtpkgs-2/ibm-prtm/ibm-prtmd $RPM_BUILD_ROOT/usr/sbin
install $RPM_BUILD_DIR/ibmrtpkgs-2/ibm-prtm/modprobe.ibm-amd.conf $RPM_BUILD_ROOT/etc/modprobe.d/ibm-amd
install $RPM_BUILD_DIR/ibmrtpkgs-2/ibm-prtm/ibm-prtm $RPM_BUILD_ROOT/etc/init.d/ibm-prtm
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/ibm-prtm rcibm-prtm)
install $RPM_BUILD_DIR/ibmrtpkgs-2/irqbindall/irqbindall $RPM_BUILD_ROOT/etc/init.d/irqbindall
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/irqbindall rcirqbindall)
install $RPM_BUILD_DIR/ibmrtpkgs-2/rtcheck/rtcheck $RPM_BUILD_ROOT/usr/bin
install $RPM_BUILD_DIR/ibmrtpkgs-2/rtcheck/rtcheck.init.suse $RPM_BUILD_ROOT/etc/init.d/rtcheck
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/rtcheck rcrtcheck)
install $RPM_BUILD_DIR/ibmrtpkgs-2/rt-watchdog/rt-watchdog $RPM_BUILD_ROOT/usr/bin
install $RPM_BUILD_DIR/ibmrtpkgs-2/rt-sshd/rt-sshd $RPM_BUILD_ROOT/etc/init.d/rt-sshd
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/rt-sshd rcrt-sshd)
install $RPM_BUILD_DIR/ibmrtpkgs-2/set_kthread_prio/set_kthread_prio.conf $RPM_BUILD_ROOT/etc/set_kthread_prio.conf
install $RPM_BUILD_DIR/ibmrtpkgs-2/set_kthread_prio/set_kthread_prio $RPM_BUILD_ROOT/etc/init.d/set_kthread_prio
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/set_kthread_prio rcset_kthread_prio)
for i in `( cd $RPM_BUILD_ROOT ; find * | sort )` ; do
if ! test -d $RPM_BUILD_ROOT/$i ; then
echo "/$i"
fi
done > %{_builddir}/%{name}.list
# add unowned directory to keep build happy
echo /etc/modprobe.d >> %{_builddir}/%{name}.list
%post
%{fillup_and_insserv -fY ipmi}
%{fillup_and_insserv -fy ibm-prtm}
%{fillup_and_insserv -fy irqbindall}
%{fillup_and_insserv -fy rtcheck}
%{fillup_and_insserv -fy set_kthread_prio}
if test ! -e /.buildenv; then
/usr/sbin/rcibm-prtm start
/usr/sbin/rcirqbindall start
/usr/sbin/rcrtcheck start
/usr/sbin/rcset_kthread_prio start
/usr/sbin/ibmconfig
fi
%postun
%{restart_on_update ibm-prtm irqbinall rtcheck set_kthread_prio}
%{insserv_cleanup}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{_builddir}/%{name}.list
%defattr(-,root,root)
%doc COPYING README
%changelog