mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-04 20:29:09 +01:00
system/haveged: SlackBuild updated (thanks to Nikos Giotis).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
parent
a9fa4b628f
commit
39dab91813
2 changed files with 28 additions and 10 deletions
|
@ -22,14 +22,20 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
# Modified by Nikos Giotis 20170903, Athens, GR
|
||||||
|
# Use static building
|
||||||
|
# Changed install target to /sbin, /lib[64]
|
||||||
|
# Added check for existing installation due to problems when rebuilding
|
||||||
|
# produces binary that segfaults if any previous installation is there
|
||||||
|
|
||||||
PRGNAM=haveged
|
PRGNAM=haveged
|
||||||
VERSION=${VERSION:-1.9.1}
|
VERSION=${VERSION:-1.9.1}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-2}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
if [ -z "$ARCH" ]; then
|
||||||
case "$( uname -m )" in
|
case "$( uname -m )" in
|
||||||
i?86) ARCH=i486 ;;
|
i?86) ARCH=i586 ;;
|
||||||
arm*) ARCH=arm ;;
|
arm*) ARCH=arm ;;
|
||||||
*) ARCH=$( uname -m ) ;;
|
*) ARCH=$( uname -m ) ;;
|
||||||
esac
|
esac
|
||||||
|
@ -40,8 +46,8 @@ TMP=${TMP:-/tmp/SBo}
|
||||||
PKG=$TMP/package-$PRGNAM
|
PKG=$TMP/package-$PRGNAM
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
if [ "$ARCH" = "i486" ]; then
|
if [ "$ARCH" = "i586" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||||
LIBDIRSUFFIX=""
|
LIBDIRSUFFIX=""
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
elif [ "$ARCH" = "i686" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||||
|
@ -56,6 +62,16 @@ fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Try to detect any previous installations and bail out if true
|
||||||
|
if [ -f "/usr/lib$LIBDIRSUFFIX/libhavege.so" -o \
|
||||||
|
-f "/usr/lib$LIBDIRSUFFIX/libhavege.a" -o \
|
||||||
|
-f "/lib$LIBDIRSUFFIX/libhavege.so" -o \
|
||||||
|
-f "/lib$LIBDIRSUFFIX/libhavege.a" ]; then
|
||||||
|
echo 'Detected libhaveged!' >&2
|
||||||
|
echo 'Please remove libhaveged before building a new one.' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf $PKG
|
rm -rf $PKG
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
cd $TMP
|
cd $TMP
|
||||||
|
@ -67,18 +83,20 @@ find -L . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||||
|
|
||||||
|
# Static build for easier inclusion in initrd
|
||||||
CFLAGS="$SLKCFLAGS" \
|
CFLAGS="$SLKCFLAGS" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
|
LDFLAGS="-static" \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
--sbindir=/sbin \
|
||||||
|
--libdir=/lib${LIBDIRSUFFIX} \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--mandir=/usr/man \
|
--mandir=/usr/man \
|
||||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||||
--disable-static \
|
|
||||||
--build=$ARCH-slackware-linux
|
--build=$ARCH-slackware-linux
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
|
@ -9,9 +9,9 @@ haveged_start() {
|
||||||
if [ -f $PIDFILE ]; then
|
if [ -f $PIDFILE ]; then
|
||||||
echo "HAVEGE daemon is already running as PID $(cat $PIDFILE) " >&2
|
echo "HAVEGE daemon is already running as PID $(cat $PIDFILE) " >&2
|
||||||
exit 3
|
exit 3
|
||||||
elif [ -x /usr/sbin/haveged ]; then
|
elif [ -x /sbin/haveged ]; then
|
||||||
echo "Starting HAVEGE daemon: /usr/sbin/haveged"
|
echo "Starting HAVEGE daemon: /sbin/haveged"
|
||||||
/usr/sbin/haveged $HAVEGED_OPTS
|
/sbin/haveged $HAVEGED_OPTS
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue