diff --git a/ipmitool/ChangeLog b/ipmitool/ChangeLog index 750851d..e370eec 100644 --- a/ipmitool/ChangeLog +++ b/ipmitool/ChangeLog @@ -1,3 +1,6 @@ + * Add Solaris x86 interface plugin + * Add support for building Solaris packages + version 1.5.9 * Add ability to get a particular sensor by name * Add ability to set a particular sensor threshold diff --git a/ipmitool/Makefile.am b/ipmitool/Makefile.am index c22abf9..24a34ee 100644 --- a/ipmitool/Makefile.am +++ b/ipmitool/Makefile.am @@ -48,14 +48,12 @@ SUBDIRS = libltdl lib src include doc contrib control dist-hook: ipmitool.spec cp ipmitool.spec $(distdir) -solaris-pkg: SOLARIS_NAME := SUNW@IPMITOOL_BIN@ -solaris-pkg: SOLARIS_PACKAGE := $(SOLARIS_NAME)-@VERSION@-@OS@-@ARCH@ -solaris-pkg: DESTDIR := /tmp/$(SOLARIS_NAME) -solaris-pkg: control/pkginfo - $(MAKE) DESTDIR=$(DESTDIR) install-strip - $(STRIP) $(DESTDIR)$(prefix)/bin/@IPMITOOL_BIN@ - (cd control ; pkgmk -o -r $(DESTDIR)) - pkgtrans -s spool $(DESTDIR)/$(SOLARIS_PACKAGE) $(SOLARIS_NAME) - gzip -c $(DESTDIR)/$(SOLARIS_PACKAGE) > $(SOLARIS_PACKAGE).gz - rm -rf $(DESTDIR) - +pkg: PKG := @IPMITOOL_BIN@-@VERSION@-@OS@-@ARCH@ +pkg: control/pkginfo + $(STRIP) src/@IPMITOOL_BIN@ +# this needs done twice to workaround bug in gnu binutils + $(STRIP) src/@IPMITOOL_BIN@ + (cd control ; pkgmk -o -d /tmp) + pkgtrans -s /tmp $(PKG) @IPMITOOL_BIN@ + gzip -c /tmp/$(PKG) > $(PKG).gz + -rm -rf /tmp/@IPMITOOL_BIN@ /tmp/$(PKG) diff --git a/ipmitool/configure.in b/ipmitool/configure.in index d0397c7..45dd4fb 100644 --- a/ipmitool/configure.in +++ b/ipmitool/configure.in @@ -78,18 +78,34 @@ if test "x$exec_prefix" = "xNONE"; then exec_prefix="$prefix" fi +case "$host_os" in +solaris*) + MAKE=gmake + STRIP=gstrip + LD=gld + AR=gar + ;; +esac + AC_SUBST(ARCH, $host_cpu) AC_SUBST(OS, $host_os) AC_SUBST(PSTAMP, $host) +AC_SUBST(BASEDIR, $prefix) dnl Solaris convention is command-line tools have *adm and GUIs have *tool suffix -IPMITOOL_BIN="ipmitool" AC_ARG_ENABLE([ipmiadm], - [[ --enable-ipmiadm enable rename of ipmitool to ipmiadm [default=no]]],,enable_ipmiadm=no) + [[ --enable-ipmiadm enable rename of ipmitool to ipmiadm]],, + [case "$host_os" in + solaris*) + IPMITOOL_BIN="ipmiadm" + enable_ipmiadm=yes + ;; + *) + IPMITOOL_BIN="ipmitool" + enable_ipmiadm=no + ;; + esac]) AM_CONDITIONAL(IPMIADM, test "x$enable_ipmiadm" = "xyes") -if test "x$enable_ipmiadm" = "xyes"; then - IPMITOOL_BIN="ipmiadm" -fi AC_DEFINE_UNQUOTED(IPMITOOL_BIN, "$IPMITOOL_BIN", "IPMItool binary name") AC_SUBST(IPMITOOL_BIN) @@ -227,6 +243,7 @@ AC_CONFIG_FILES([ipmitool.spec contrib/Makefile control/Makefile control/pkginfo + control/prototype lib/Makefile include/Makefile include/ipmitool/Makefile diff --git a/ipmitool/control/Makefile.am b/ipmitool/control/Makefile.am index fee0577..de1512e 100644 --- a/ipmitool/control/Makefile.am +++ b/ipmitool/control/Makefile.am @@ -34,6 +34,6 @@ MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = pkginfo.in prototype +EXTRA_DIST = pkginfo.in prototype.in -dist-hook: pkginfo +dist-hook: pkginfo prototype diff --git a/ipmitool/control/pkginfo.in b/ipmitool/control/pkginfo.in index e6247c4..cdabcfe 100644 --- a/ipmitool/control/pkginfo.in +++ b/ipmitool/control/pkginfo.in @@ -1,4 +1,4 @@ -PKG="SUNW@IPMITOOL_BIN@" +PKG="@IPMITOOL_BIN@" NAME="@IPMITOOL_BIN@ - Utility for IPMI control" ARCH="@ARCH@" VERSION="@VERSION@" @@ -6,5 +6,5 @@ CATEGORY="system" VENDOR="Duncan Laurie" EMAIL="duncan@sun.com" PSTAMP="@PSTAMP@" -BASEDIR="/" +BASEDIR="@BASEDIR@" CLASSES="none" diff --git a/ipmitool/control/prototype b/ipmitool/control/prototype deleted file mode 100644 index 8acdb54..0000000 --- a/ipmitool/control/prototype +++ /dev/null @@ -1,6 +0,0 @@ -i pkginfo -d none usr 0755 root sys -d none usr/bin 0755 root bin -f none usr/bin/ipmiadm 0755 root bin -d none usr/man/man1 0755 root bin -f none usr/man/man1/ipmiadm.1 0644 root bin diff --git a/ipmitool/control/prototype.in b/ipmitool/control/prototype.in new file mode 100644 index 0000000..805e251 --- /dev/null +++ b/ipmitool/control/prototype.in @@ -0,0 +1,7 @@ +i pkginfo +d none bin ? ? ? +f none bin/@IPMITOOL_BIN@=../src/@IPMITOOL_BIN@ 0755 root bin +d none share ? ? ? +d none share/man ? ? ? +d none share/man/man1 ? ? ? +f none share/man/man1/@IPMITOOL_BIN@.1=../doc/ipmitool.1 0644 root bin