summaryrefslogtreecommitdiff
path: root/misc/rng-tools
diff options
context:
space:
mode:
Diffstat (limited to 'misc/rng-tools')
-rw-r--r--misc/rng-tools/README5
-rw-r--r--misc/rng-tools/rng-tools.SlackBuild88
-rw-r--r--misc/rng-tools/rng-tools.info8
-rw-r--r--misc/rng-tools/slack-desc19
4 files changed, 120 insertions, 0 deletions
diff --git a/misc/rng-tools/README b/misc/rng-tools/README
new file mode 100644
index 0000000000..daad49e502
--- /dev/null
+++ b/misc/rng-tools/README
@@ -0,0 +1,5 @@
+rng-tools (hardware random number generator utilities)
+
+rng-tools includes rngd for injecting entropy from hardware random
+number generator into the kernels random device, and rngtest which
+checks the randomness of data using FIPS 140-2 tests.
diff --git a/misc/rng-tools/rng-tools.SlackBuild b/misc/rng-tools/rng-tools.SlackBuild
new file mode 100644
index 0000000000..71c0724786
--- /dev/null
+++ b/misc/rng-tools/rng-tools.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Slackware build script for rng-tools
+
+# Written by David Miller dave at frop dot net
+# This script is released into the public domain
+
+PRGNAM=rng-tools # replace with name of program
+VERSION=${VERSION:-2} # replace with version of program
+ARCH=${ARCH:-i486} # this should not change
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo} # the "_SBo" is required
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e # Exit on most errors
+# If you prefer to do selective error checking with
+# command || exit 1
+# then that's also acceptable.
+
+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 . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Your application will probably need different configure flags;
+# these are provided as an example only.
+# Be sure to build only shared libraries unless there's some need for
+# static.
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man
+
+# Compile the application and install it into the $PKG directory
+make
+make install-strip DESTDIR=$PKG
+
+
+# Compress man pages
+# If the man pages are installed to /usr/share/man instead, you'll need to either
+# add the --mandir=/usr/man flag to configure or move them manually after the
+# make install process is run.
+( 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
+)
+
+# Copy program documentation into the package
+# The included documentation varies from one application to another, so be sure
+# to adjust your script as needed
+# Also, include the SlackBuild script in the documentation directory
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Make the package; be sure to leave it in $OUTPUT
+# If package symlinks need to be created during install *before*
+# your custom contents of doinst.sh runs, then add the -p switch to
+# the makepkg command below -- see makepkg(8) for details
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/misc/rng-tools/rng-tools.info b/misc/rng-tools/rng-tools.info
new file mode 100644
index 0000000000..3986b02a1b
--- /dev/null
+++ b/misc/rng-tools/rng-tools.info
@@ -0,0 +1,8 @@
+PRGNAM="rng-tools"
+VERSION="2"
+HOMEPAGE="http://sourceforge.net/projects/gkernel/"
+DOWNLOAD="http://downloads.sourceforge.net/gkernel/rng-tools-2.tar.gz"
+MD5SUM="63d503191eabed630324c104cc024475"
+MAINTAINER="David Miller"
+EMAIL="dave@frop.net"
+APPROVED="David Somero" \ No newline at end of file
diff --git a/misc/rng-tools/slack-desc b/misc/rng-tools/slack-desc
new file mode 100644
index 0000000000..57b0766b1f
--- /dev/null
+++ b/misc/rng-tools/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+rng-tools: rng-tools (hardware random number generator utilities)
+rng-tools:
+rng-tools: rng-tools includes rngd for injecting entropy from hardware random
+rng-tools: number generator into the kernels random device, and rngtest which
+rng-tools: checks the randomness of data using FIPS 140-2 tests.
+rng-tools:
+rng-tools:
+rng-tools:
+rng-tools:
+rng-tools:
+rng-tools: