diff options
author | Wayne Cuddy <wcuddy@gmail.com> | 2019-04-01 08:17:53 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-04-05 07:38:33 +0700 |
commit | 2dce8073c6e06875fd06607c330a53e05f41ea43 (patch) | |
tree | 2ab942c0930ffcf64f2b86a1d787f8f0e36a75fa | |
parent | bf1993b7f3385e6a3037a7134cbb24b85424b3fe (diff) | |
download | slackbuilds-2dce8073c6e06875fd06607c330a53e05f41ea43.tar.gz |
system/freeipmi: Added (system management).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/freeipmi/README | 10 | ||||
-rw-r--r-- | system/freeipmi/doinst.sh | 22 | ||||
-rw-r--r-- | system/freeipmi/freeipmi.SlackBuild | 123 | ||||
-rw-r--r-- | system/freeipmi/freeipmi.info | 10 | ||||
-rw-r--r-- | system/freeipmi/slack-desc | 19 |
5 files changed, 184 insertions, 0 deletions
diff --git a/system/freeipmi/README b/system/freeipmi/README new file mode 100644 index 0000000000..5805f45eac --- /dev/null +++ b/system/freeipmi/README @@ -0,0 +1,10 @@ +FreeIPMI provides in-band and out-of-band IPMI software based on the +IPMI v1.5/2.0 specification. + +The IPMI specification defines a set of interfaces for platform +management. It is utilized by a wide variety of vendors for system +management on motherboards. The features of IPMI that most users will +be interested in are sensor monitoring, remote power control, +serial-over-LAN (SOL), and system debugging. The FreeIPMI tools and +libraries in this package should provide users with the ability to +access and utilize these features. diff --git a/system/freeipmi/doinst.sh b/system/freeipmi/doinst.sh new file mode 100644 index 0000000000..fe318696f2 --- /dev/null +++ b/system/freeipmi/doinst.sh @@ -0,0 +1,22 @@ + +config() { + NEW="$1" + OLD="${1%.new}" + if [ ! -r $OLD ]; + then + # If there's no config file by that name, mv it over: + mv $NEW $OLD + elif [ "$(md5sum <$OLD)" = "$(md5sum <$NEW)" ]; + then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# doinst.sh reads the list of files from ./install/conffiles at install time. +# ./install/conffiles was generated at build time/ +for cf in $(cat install/conffiles) +do + config $cf.new +done diff --git a/system/freeipmi/freeipmi.SlackBuild b/system/freeipmi/freeipmi.SlackBuild new file mode 100644 index 0000000000..eb422db3c1 --- /dev/null +++ b/system/freeipmi/freeipmi.SlackBuild @@ -0,0 +1,123 @@ +#!/bin/sh + +# Copyright 2019, Wayne Cuddy, wcuddyATgmailDOTcom +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# +# 2019-03-30: Initial Release +# + +PRGNAM=freeipmi +VERSION=${VERSION:-1.6.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cd $TMP/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +rm -rf $PKG/usr/share + +cd $PKG + +mkdir -p etc/rc.d +# Convert the init script to Slackware style rc scripts. +for i in etc/init.d/* +do + mv $i etc/rc.d/rc.${i##*/} + chmod 644 etc/rc.d/rc.${i##*/} +done + +rmdir etc/init.d + +# Don't clobber existing config files. +for i in $(find etc -type f) +do + mv $i $i.new + echo $i +done 1>>$PKG/install/conffiles + +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/freeipmi/freeipmi.info b/system/freeipmi/freeipmi.info new file mode 100644 index 0000000000..983ae37b23 --- /dev/null +++ b/system/freeipmi/freeipmi.info @@ -0,0 +1,10 @@ +PRGNAM="freeipmi" +VERSION="1.6.3" +HOMEPAGE="https://www.gnu.org/software/freeipmi" +DOWNLOAD="https://ftp.gnu.org/gnu/freeipmi/freeipmi-1.6.3.tar.gz" +MD5SUM="b2d97e20db9b81b460ce1b9dad5bf54e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Wayne Cuddy" +EMAIL="wcuddy@gmail.com" diff --git a/system/freeipmi/slack-desc b/system/freeipmi/slack-desc new file mode 100644 index 0000000000..3974cbf3d0 --- /dev/null +++ b/system/freeipmi/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +freeipmi: freeipmi (system management) +freeipmi: +freeipmi: Tools which provide in in-band and out-of-band system management via +freeipmi: the IPMI v1.5/2.0 specification. +freeipmi: +freeipmi: +freeipmi: +freeipmi: +freeipmi: +freeipmi: +freeipmi: |