automatically configure gnu tools for building if on solaris

update pkg tag for building solaris packages
This commit is contained in:
Duncan Laurie 2004-04-12 05:35:50 +00:00
parent 94ea137687
commit 3b58655b89
7 changed files with 45 additions and 26 deletions

View File

@ -1,3 +1,6 @@
* Add Solaris x86 interface plugin
* Add support for building Solaris packages
version 1.5.9 version 1.5.9
* Add ability to get a particular sensor by name * Add ability to get a particular sensor by name
* Add ability to set a particular sensor threshold * Add ability to set a particular sensor threshold

View File

@ -48,14 +48,12 @@ SUBDIRS = libltdl lib src include doc contrib control
dist-hook: ipmitool.spec dist-hook: ipmitool.spec
cp ipmitool.spec $(distdir) cp ipmitool.spec $(distdir)
solaris-pkg: SOLARIS_NAME := SUNW@IPMITOOL_BIN@ pkg: PKG := @IPMITOOL_BIN@-@VERSION@-@OS@-@ARCH@
solaris-pkg: SOLARIS_PACKAGE := $(SOLARIS_NAME)-@VERSION@-@OS@-@ARCH@ pkg: control/pkginfo
solaris-pkg: DESTDIR := /tmp/$(SOLARIS_NAME) $(STRIP) src/@IPMITOOL_BIN@
solaris-pkg: control/pkginfo # this needs done twice to workaround bug in gnu binutils
$(MAKE) DESTDIR=$(DESTDIR) install-strip $(STRIP) src/@IPMITOOL_BIN@
$(STRIP) $(DESTDIR)$(prefix)/bin/@IPMITOOL_BIN@ (cd control ; pkgmk -o -d /tmp)
(cd control ; pkgmk -o -r $(DESTDIR)) pkgtrans -s /tmp $(PKG) @IPMITOOL_BIN@
pkgtrans -s spool $(DESTDIR)/$(SOLARIS_PACKAGE) $(SOLARIS_NAME) gzip -c /tmp/$(PKG) > $(PKG).gz
gzip -c $(DESTDIR)/$(SOLARIS_PACKAGE) > $(SOLARIS_PACKAGE).gz -rm -rf /tmp/@IPMITOOL_BIN@ /tmp/$(PKG)
rm -rf $(DESTDIR)

View File

@ -78,18 +78,34 @@ if test "x$exec_prefix" = "xNONE"; then
exec_prefix="$prefix" exec_prefix="$prefix"
fi fi
case "$host_os" in
solaris*)
MAKE=gmake
STRIP=gstrip
LD=gld
AR=gar
;;
esac
AC_SUBST(ARCH, $host_cpu) AC_SUBST(ARCH, $host_cpu)
AC_SUBST(OS, $host_os) AC_SUBST(OS, $host_os)
AC_SUBST(PSTAMP, $host) AC_SUBST(PSTAMP, $host)
AC_SUBST(BASEDIR, $prefix)
dnl Solaris convention is command-line tools have *adm and GUIs have *tool suffix dnl Solaris convention is command-line tools have *adm and GUIs have *tool suffix
IPMITOOL_BIN="ipmitool"
AC_ARG_ENABLE([ipmiadm], 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") 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_DEFINE_UNQUOTED(IPMITOOL_BIN, "$IPMITOOL_BIN", "IPMItool binary name")
AC_SUBST(IPMITOOL_BIN) AC_SUBST(IPMITOOL_BIN)
@ -227,6 +243,7 @@ AC_CONFIG_FILES([ipmitool.spec
contrib/Makefile contrib/Makefile
control/Makefile control/Makefile
control/pkginfo control/pkginfo
control/prototype
lib/Makefile lib/Makefile
include/Makefile include/Makefile
include/ipmitool/Makefile include/ipmitool/Makefile

View File

@ -34,6 +34,6 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = pkginfo.in prototype EXTRA_DIST = pkginfo.in prototype.in
dist-hook: pkginfo dist-hook: pkginfo prototype

View File

@ -1,4 +1,4 @@
PKG="SUNW@IPMITOOL_BIN@" PKG="@IPMITOOL_BIN@"
NAME="@IPMITOOL_BIN@ - Utility for IPMI control" NAME="@IPMITOOL_BIN@ - Utility for IPMI control"
ARCH="@ARCH@" ARCH="@ARCH@"
VERSION="@VERSION@" VERSION="@VERSION@"
@ -6,5 +6,5 @@ CATEGORY="system"
VENDOR="Duncan Laurie" VENDOR="Duncan Laurie"
EMAIL="duncan@sun.com" EMAIL="duncan@sun.com"
PSTAMP="@PSTAMP@" PSTAMP="@PSTAMP@"
BASEDIR="/" BASEDIR="@BASEDIR@"
CLASSES="none" CLASSES="none"

View File

@ -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

View File

@ -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