summaryrefslogtreecommitdiff
path: root/system/hwinfo/hwinfo.SlackBuild
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-05-13 01:00:51 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 01:00:51 +0200
commita0b6df8c4845e5beec45e7baaee094cf1894dd6f (patch)
tree00b2559f6573915cc753c5d6ee1fbda6bb4da9d8 /system/hwinfo/hwinfo.SlackBuild
parente3643e46abae75a4e506bd002e8f8125b643d84e (diff)
downloadslackbuilds-a0b6df8c4845e5beec45e7baaee094cf1894dd6f.tar.gz
system/hwinfo: Added to 13.0 repository
Diffstat (limited to 'system/hwinfo/hwinfo.SlackBuild')
-rw-r--r--system/hwinfo/hwinfo.SlackBuild92
1 files changed, 92 insertions, 0 deletions
diff --git a/system/hwinfo/hwinfo.SlackBuild b/system/hwinfo/hwinfo.SlackBuild
new file mode 100644
index 0000000000..6dbb81eb8d
--- /dev/null
+++ b/system/hwinfo/hwinfo.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for hwinfo
+
+# Copyright 2009-2010 Heinz Wiesinger, Amsterdam, The Netherlands
+# 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.
+
+PRGNAM=hwinfo
+VERSION=16.10
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+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 xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# remove suse specific syscall
+sed -i '145,149 d' src/hd/kbd.c
+
+# use our CFLAGS
+sed -i "s/?= -O2/?= $SLKCFLAGS/" Makefile.common
+
+make \
+ LIBDIR=/usr/lib$LIBDIRSUFFIX
+
+make \
+ LIBDIR=/usr/lib$LIBDIRSUFFIX \
+ DESTDIR=$PKG \
+ install
+
+mkdir -p $PKG/usr/man/man8
+install -m 644 doc/hwinfo.8 $PKG/usr/man/man8/
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Changelog COPYING MAINTAINER README VERSION \
+ $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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}