diff options
-rw-r--r-- | libraries/libsmbios/README | 6 | ||||
-rw-r--r-- | libraries/libsmbios/doinst.sh | 15 | ||||
-rw-r--r-- | libraries/libsmbios/libsmbios.SlackBuild | 47 | ||||
-rw-r--r-- | libraries/libsmbios/libsmbios.info | 8 |
4 files changed, 50 insertions, 26 deletions
diff --git a/libraries/libsmbios/README b/libraries/libsmbios/README index 98aa6e25cafcb..7dfa80f7237be 100644 --- a/libraries/libsmbios/README +++ b/libraries/libsmbios/README @@ -1,9 +1,3 @@ The libsmbios project aims towards providing access to as much BIOS information as possible. It does this by providing a library of functions that can be used as well as sample binaries. - -Please note that documentation is especially sparse in this package. -There are no man pages, and many of the binaries included here are -untested and perhaps dangerous to use on non-supported hardware. This -script exists solely to satisfy a dependency for pommed (also available -at SlackBuilds.org). diff --git a/libraries/libsmbios/doinst.sh b/libraries/libsmbios/doinst.sh new file mode 100644 index 0000000000000..81ca56b4e6ea7 --- /dev/null +++ b/libraries/libsmbios/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/libsmbios/logging.conf.new + diff --git a/libraries/libsmbios/libsmbios.SlackBuild b/libraries/libsmbios/libsmbios.SlackBuild index 05336e0288537..aa65c3f1acbc2 100644 --- a/libraries/libsmbios/libsmbios.SlackBuild +++ b/libraries/libsmbios/libsmbios.SlackBuild @@ -1,13 +1,11 @@ #!/bin/sh -# Exit on most errors -#set -e - PRGNAM=libsmbios -VERSION=0.13.10 +VERSION=2.2.19 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -15,15 +13,22 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -32,31 +37,39 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ - --bindir=/usr/sbin \ - --includedir=/usr/include \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ - --localstatedir=/var + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-static \ + --build=$ARCH-slackware-linux make make install DESTDIR=$PKG -# These don't get included, but probably should -cp -a include $PKG/usr -chown -R root:root $PKG/usr/include -find $PKG/usr/include -type f -exec chmod 0644 {} \; +# Don't clobber the config file +mv $PKG/etc/libsmbios/logging.conf $PKG/etc/libsmbios/logging.conf.new + +# Remove the ick, er, yum stuff +rm -rf $PKG/etc/yum ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING COPYING-GPL COPYING-OSL ChangeLog INSTALL NEWS \ - README TODO doc/* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING* ChangeLog INSTALL NEWS README TODO doc/* \ + $PKG/usr/doc/$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 cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/libraries/libsmbios/libsmbios.info b/libraries/libsmbios/libsmbios.info index 21b6e94c644c0..a056b7df032fb 100644 --- a/libraries/libsmbios/libsmbios.info +++ b/libraries/libsmbios/libsmbios.info @@ -1,8 +1,10 @@ PRGNAM="libsmbios" -VERSION="0.13.10" +VERSION="2.2.19" HOMEPAGE="http://linux.dell.com/libsmbios/main/index.html" -DOWNLOAD="http://linux.dell.com/libsmbios/download/libsmbios/libsmbios-0.13.10/libsmbios-0.13.10.tar.gz" -MD5SUM="23faf207803e7249be7662697f8218a9" +DOWNLOAD="http://linux.dell.com/libsmbios/download/libsmbios/libsmbios-2.2.19/libsmbios-2.2.19.tar.bz2" +MD5SUM="ea18d71a3d310d1efe2404e8af218e15" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Alan_Hicks" EMAIL="alan@lizella.net" APPROVED="rworkman" |