aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/ipmitool
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2006-02-17 01:49:06 +0800
committerambrisko <ambrisko@FreeBSD.org>2006-02-17 01:49:06 +0800
commit6eb7904612945e8ebd5f31a4f840bfa210dcfefd (patch)
treeabf0139df66fe2b8e2fe027df95275a6e80a1166 /sysutils/ipmitool
parent33619e22de65350d5d507f7d223cfc12c9803216 (diff)
downloadfreebsd-ports-gnome-6eb7904612945e8ebd5f31a4f840bfa210dcfefd.tar.gz
freebsd-ports-gnome-6eb7904612945e8ebd5f31a4f840bfa210dcfefd.tar.zst
freebsd-ports-gnome-6eb7904612945e8ebd5f31a4f840bfa210dcfefd.zip
Enhance OpenIPMI driver detection to ipmitool to find FreeBSD's
compatible version in sys/ipmi.h if it exists. Enable OpenIPMI mode. Initial patches by me, polishing by Dmitry (maintainer). Dmitry will be submitting these changes to the ipmitool developers. Approved by: Maintainer
Diffstat (limited to 'sysutils/ipmitool')
-rw-r--r--sysutils/ipmitool/Makefile26
-rw-r--r--sysutils/ipmitool/files/patch-aa45
-rw-r--r--sysutils/ipmitool/pkg-descr4
3 files changed, 70 insertions, 5 deletions
diff --git a/sysutils/ipmitool/Makefile b/sysutils/ipmitool/Makefile
index a0b8c66c6f28..76552d8ee191 100644
--- a/sysutils/ipmitool/Makefile
+++ b/sysutils/ipmitool/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ipmitool
PORTVERSION= 1.8.6
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -16,12 +17,14 @@ COMMENT= CLI to manage IPMI systems
USE_GMAKE= yes
USE_OPENSSL= yes
+USE_AUTOTOOLS= autoconf:259 libtool:15 aclocal:19 automake:19
+# libtool15 installs it's aclocal macros into ${LOCALBASE}/share/aclocal
+ACLOCAL_ARGS= --acdir=${ACLOCAL_DIR} -I ${LOCALBASE}/share/aclocal
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
-# On FreeBSD only lan and lanplus interfaces are supported at this time
CONFIGURE_ARGS+= --enable-intf-lan --enable-intf-lanplus \
- --disable-intf-open --disable-intf-imb --disable-intf-lipmi \
- --disable-intf-bmc
+ --disable-intf-imb --disable-intf-lipmi --disable-intf-bmc \
+ ${OPENIPMI_OPT}
PLIST_FILES= bin/ipmitool sbin/ipmievd
PLIST_DIRS= share/${PORTNAME}
PORTDOCS= README AUTHORS ChangeLog COPYING
@@ -35,4 +38,19 @@ DATAFILES= bmclanconf ipmi.init.basic ipmi.init.redhat README \
PLIST_FILES+= share/${PORTNAME}/${f}
.endfor
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+# Silence automake about missing files
+pre-configure:
+ @${TOUCH} ${WRKSRC}/NEWS ${WRKSRC}/INSTALL
+
+# FreeBSD has OpenIPMI-compatible driver, ipmi(4),
+# in 7-current after 2006-02-12. On older systems
+# only lan and lanplus interfaces are supported.
+.if exists(/usr/include/sys/ipmi.h)
+OPENIPMI_OPT= --enable-intf-open
+.else
+OPENIPMI_OPT= --disable-intf-open
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/ipmitool/files/patch-aa b/sysutils/ipmitool/files/patch-aa
new file mode 100644
index 000000000000..7c803d7904fb
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-aa
@@ -0,0 +1,45 @@
+diff -ruN ../ipmitool-1.8.6/config.h.in ./config.h.in
+--- ../ipmitool-1.8.6/config.h.in Tue Jan 17 23:54:02 2006
++++ ./config.h.in Thu Feb 16 15:41:18 2006
+@@ -24,6 +24,9 @@
+ /* Define to 1 if you have the <fcntl.h> header file. */
+ #undef HAVE_FCNTL_H
+
++/* Define to 1 if you have the <sys/ipmi.h> header file. */
++#undef HAVE_FREEBSD_IPMI_H
++
+ /* Define to 1 if you have the `gethostbyname' function. */
+ #undef HAVE_GETHOSTBYNAME
+
+diff -ruN ../ipmitool-1.8.6/configure.in ./configure.in
+--- ../ipmitool-1.8.6/configure.in Tue Jan 17 23:50:29 2006
++++ ./configure.in Thu Feb 16 15:48:14 2006
+@@ -192,7 +192,10 @@
+ AC_CHECK_HEADER([linux/ipmi.h],
+ [AC_DEFINE(HAVE_OPENIPMI_H, [1],
+ [Define to 1 if you have the <linux/ipmi.h> header file.])],
+- [echo "** Unable to find OpenIPMI header files. Using internal version."])
++ [AC_CHECK_HEADER([sys/ipmi.h],
++ [AC_DEFINE(HAVE_FREEBSD_IPMI_H, [1],
++ [Define to 1 if you have the <sys/ipmi.h> header file.])],
++ [echo "** Unable to find OpenIPMI header files. Using internal version."])])
+
+ dnl set RPM distro tag for use in RPM name
+ AC_ARG_WITH([rpm-distro],
+diff -ruN ../ipmitool-1.8.6/src/plugins/open/open.c ./src/plugins/open/open.c
+--- ../ipmitool-1.8.6/src/plugins/open/open.c Tue Jul 12 21:49:12 2005
++++ ./src/plugins/open/open.c Thu Feb 16 15:41:51 2006
+@@ -51,9 +51,12 @@
+
+ #include <config.h>
+
+-#ifdef HAVE_OPENIPMI_H
++#if defined(HAVE_OPENIPMI_H)
+ # include <linux/compiler.h>
+ # include <linux/ipmi.h>
++#elif defined(HAVE_FREEBSD_IPMI_H)
++/* FreeBSD OpenIPMI-compatible header */
++# include <sys/ipmi.h>
+ #else
+ # include "open.h"
+ #endif
diff --git a/sysutils/ipmitool/pkg-descr b/sysutils/ipmitool/pkg-descr
index ab0ad3720f1c..14cba7d6e676 100644
--- a/sysutils/ipmitool/pkg-descr
+++ b/sysutils/ipmitool/pkg-descr
@@ -6,6 +6,8 @@ provides the ability to read the SDR and print sensor values, display
the contents of the SEL, print FRU information, read and set LAN
configuration parameters, and perform chassis power control."
-Currently only LAN and LANPlus interfaces are supported on FreeBSD.
+FreeBSD has ipmi(4) driver for in-band IPMI operations in
+7-current after 2006-02-12. On older systems only out-of-band
+LAN and LANPlus interfaces are supported.
WWW: http://ipmitool.sourceforge.net/