summaryrefslogtreecommitdiffstats
path: root/system/fio/fio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/fio/fio.SlackBuild')
-rw-r--r--system/fio/fio.SlackBuild44
1 files changed, 28 insertions, 16 deletions
diff --git a/system/fio/fio.SlackBuild b/system/fio/fio.SlackBuild
index 73ae4e24e9..83a120bd8f 100644
--- a/system/fio/fio.SlackBuild
+++ b/system/fio/fio.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for fio
+# Copyright 2023-2024 fourtysixandtwo <fourtysixandtwo@sliderr.net>
# Copyright 2012 Binh Nguyen <binhvng@gmail.com>
-# Copyright 2015-2019 Brenton Earl <brent@exitstatusone.com>
+# Copyright 2015-2020 Brenton Earl <brent@exitstatusone.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -12,7 +13,7 @@
# 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
+# 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,
@@ -23,10 +24,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=fio
-VERSION=${VERSION:-3.14}
+VERSION=${VERSION:-3.37}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +40,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -50,16 +58,14 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
-# Fio has a Gtk interface that is not built by default.
-# To enable it pass 'yes' to the GUI variable
-# Example: GUI=yes sh fio.SlackBuild
-gui="" ; [ "$GUI" = "yes" ] && gui="--enable-gfio"
-
set -e
rm -rf $PKG
@@ -71,9 +77,14 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -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 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# Fio has a Gtk interface that is not built by default.
+# To enable it pass 'yes' to the GUI variable
+# Example: GUI=yes sh fio.SlackBuild
+gui="" ; [ "$GUI" = "yes" ] && gui="--enable-gfio"
./configure \
--prefix="/usr" \
@@ -86,11 +97,12 @@ make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING HOWTO README REPORTING-BUGS examples/ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING HOWTO.rst MORAL-LICENSE README.rst REPORTING-BUGS \
+ examples/ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Add .desktop file if GUI is built
@@ -101,8 +113,8 @@ if [ "$GUI" = "yes" ]; then
fi
mkdir -p $PKG/install
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE