mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +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
|
||||
# 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
|
||||
VERSION=${VERSION:-1.9.1}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
|
@ -40,8 +46,8 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
|
@ -56,6 +62,16 @@ fi
|
|||
|
||||
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
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
|
@ -67,18 +83,20 @@ 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 {} \;
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# Static build for easier inclusion in initrd
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
LDFLAGS="-static" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sbindir=/sbin \
|
||||
--libdir=/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||
--disable-static \
|
||||
--build=$ARCH-slackware-linux
|
||||
|
||||
make
|
||||
|
|
|
@ -9,9 +9,9 @@ haveged_start() {
|
|||
if [ -f $PIDFILE ]; then
|
||||
echo "HAVEGE daemon is already running as PID $(cat $PIDFILE) " >&2
|
||||
exit 3
|
||||
elif [ -x /usr/sbin/haveged ]; then
|
||||
echo "Starting HAVEGE daemon: /usr/sbin/haveged"
|
||||
/usr/sbin/haveged $HAVEGED_OPTS
|
||||
elif [ -x /sbin/haveged ]; then
|
||||
echo "Starting HAVEGE daemon: /sbin/haveged"
|
||||
/sbin/haveged $HAVEGED_OPTS
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue