aboutsummaryrefslogtreecommitdiff
path: root/misc/bbrun/bbrun.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-04 19:36:07 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-04 19:36:07 -0400
commited5330b26db51f77a3fc5c595872bf8c36531da5 (patch)
treed51288ace61551c1801008f2061f4289537bf78d /misc/bbrun/bbrun.SlackBuild
parentf1bfd727c1f94435ced27ae7d8f0d15098d2562b (diff)
misc/bbrun: Use SLKCFLAGS, strip binary.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'misc/bbrun/bbrun.SlackBuild')
-rw-r--r--misc/bbrun/bbrun.SlackBuild29
1 files changed, 20 insertions, 9 deletions
diff --git a/misc/bbrun/bbrun.SlackBuild b/misc/bbrun/bbrun.SlackBuild
index c1ca2b479f11..b334e2face85 100644
--- a/misc/bbrun/bbrun.SlackBuild
+++ b/misc/bbrun/bbrun.SlackBuild
@@ -24,25 +24,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220404 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - set and use SLKCFLAGS.
+# - strip binary.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=bbrun
VERSION=${VERSION:-1.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -52,6 +53,16 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
set -e
rm -rf $PKG
@@ -63,19 +74,19 @@ 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 {} \+
patch -p0 -i $CWD/patches/$PRGNAM-$VERSION-list.patch
patch -p0 -i $CWD/patches/$PRGNAM-$VERSION-makefile.patch
cd $PRGNAM
-export CFLAGS+="-fcommon"
+export CFLAGS="$SLKCFLAGS -fcommon"
make
mkdir -p $PKG/usr/bin
-cp bbrun $PKG/usr/bin
+install -s -m0755 bbrun $PKG/usr/bin
cd ..
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION