%define name freeipmi %define version 0.1.3 %define release 2mdk Summary: FreeIPMI Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Kernel and hardware Source: ftp://ftp.californiadigital.com/pub/freeipmi/download/LATEST/%{name}-%{version}.tar.gz Patch0: %{name}-xmalloc.patch.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root URL: http://www.gnu.org/software/freeipmi/index.html BuildRequires: libguile-devel # uses sys/io.h style I/O ExcludeArch: ppc %description The FreeIPMI project provides "Remote-Console" (out-of-band) and "System Management Software" (in-band) based on Intelligent Platform Management Interface (IPMI v1.5) specification. %package devel Summary: Development package for FreeIPMI Group: Development/C Requires: freeipmi = %{version}-%{release} %description devel Development package for FreeIPMI. This package includes the FreeIPMI header files and static libraries. %package fish Summary: FreeIPMI Shell Group: System/Kernel and hardware Requires: freeipmi = %{version}-%{release} %description fish Fish provides Shell, Extension/Plug-in and scripting interface. As a shell, User has access to both in-band and out-of-band access to the host BMC through a rich set of IPMI commands. %package utils Summary: FreeIPMI Utilities Group: System/Kernel and hardware Requires: freeipmi = %{version}-%{release} %description utils FreeIPMI utilities ipmipower, bmc-watchdog, ipmiping, and rmcpping. %prep %setup -q -n %{name}-%{version} %patch0 %build %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT DESTDIR="$RPM_BUILD_ROOT" make install mv $RPM_BUILD_ROOT/%{_mandir}/man1/sensors.1 $RPM_BUILD_ROOT/%{_mandir}/man1/%{name}-sensors.1 %clean rm -rf $RPM_BUILD_ROOT %post utils %if %{?_with_bmc_watchdog_start:1}%{!?_with_bmc_watchdog_start:0} # # Start bmc-watchdog, but not by default # if [ "$1" = 1 ]; then if [ -x /etc/init.d/bmc-watchdog ]; then [ -x /sbin/chkconfig ] && /sbin/chkconfig --add bmc-watchdog fi fi if [ $1 -ge 1 ]; then if [ -x /etc/init.d/bmc-watchdog ]; then if /etc/init.d/bmc-watchdog status | grep -q running; then /etc/init.d/bmc-watchdog restart else /etc/init.d/bmc-watchdog start fi fi fi %endif %if %{?_with_bmc_watchdog_condrestart:1}%{!?_with_bmc_watchdog_condrestart:0} # # Start bmc-watchdog if already running # if [ "$1" = 1 ]; then if [ -x /etc/init.d/bmc-watchdog ]; then [ -x /sbin/chkconfig ] && /sbin/chkconfig --add bmc-watchdog fi fi if [ $1 -ge 1 ]; then if [ -x /etc/init.d/bmc-watchdog ]; then /etc/init.d/bmc-watchdog condrestart fi fi %endif %if %{?_with_powerman_restart:1}%{!?_with_powerman_restart:0} # # Restart powerman if it exists # if [ -x /etc/init.d/powerman ]; then if /etc/init.d/powerman status | grep -q running; then /etc/init.d/powerman restart fi fi %endif %preun utils # # Stop bmc-watchdog if it is running # if [ "$1" = 0 ]; then if [ -x /etc/init.d/bmc-watchdog ]; then if /etc/init.d/bmc-watchdog status | grep -q running; then /etc/init.d/bmc-watchdog stop fi [ -x /sbin/chkconfig ] && /sbin/chkconfig --del bmc-watchdog fi fi %preun %_remove_install_info %{name}.info %post %_install_info %{name}.info /sbin/ldconfig %postun /sbin/ldconfig %files %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/AUTHORS %doc %{_datadir}/doc/%{name}/BUGS %doc %{_datadir}/doc/%{name}/COPYING %doc %{_datadir}/doc/%{name}/ChangeLog %doc %{_datadir}/doc/%{name}/INSTALL %doc %{_datadir}/doc/%{name}/NEWS %doc %{_datadir}/doc/%{name}/README %doc %{_datadir}/doc/%{name}/THANKS %doc %{_datadir}/doc/%{name}/TODO %doc %{_datadir}/doc/%{name}/ipmi-over-ts2000.texi %doc %{_infodir}/freeipmi.info* %{_libdir}/*so.* %{_localstatedir}/%{name}/ipckey %files devel %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/examples/Makefile %doc %{_datadir}/doc/%{name}/examples/hello-sensors.c %doc %{_datadir}/doc/%{name}/freeipmi-hackers-intro.sxi %doc %{_datadir}/doc/%{name}/ipmi-network-layout.fig %{_libdir}/*.a %{_libdir}/*.la %{_includedir}/* %{_libdir}/*so %files fish %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/fish/fish.scm %config(noreplace) %{_sysconfdir}/fish/sensors-conf.scm %{_sbindir}/fish %{_sbindir}/bmc-config %{_sbindir}/bmc-info %{_sbindir}/sel %{_sbindir}/sensors %{_mandir}/man1/bmc-config.1* %{_mandir}/man1/bmc-info.1* %{_mandir}/man1/fish.1* %{_mandir}/man1/sel.1* %{_mandir}/man1/freeipmi-sensors.1* %{_datadir}/fish/* %files utils %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/COPYING.bmc-watchdog %doc %{_datadir}/doc/%{name}/DISCLAIMER.bmc-watchdog %doc %{_datadir}/doc/%{name}/COPYING.ipmiping %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiping %doc %{_datadir}/doc/%{name}/COPYING.ipmipower %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmipower %doc %{_datadir}/doc/%{name}/COPYING.rmcpping %doc %{_datadir}/doc/%{name}/DISCLAIMER.rmcpping %config(noreplace) %{_sysconfdir}/init.d/bmc-watchdog %{_sbindir}/bmc-watchdog %{_sbindir}/ipmiping %{_sbindir}/ipmipower %{_sbindir}/rmcpping %{_mandir}/man5/ipmipower.conf.5* %{_mandir}/man8/bmc-watchdog.8* %{_mandir}/man8/ipmiping.8* %{_mandir}/man8/ipmipower.8* %{_mandir}/man8/rmcpping.8* #%{_localstatedir}/log/* %changelog * Wed Mar 16 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.1.3-2mdk - don't try to build on ppc * Tue Mar 01 2005 Erwan Velu <erwan@seanodes.com> 0.1.3-1mdk - Initial mdk release