mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
system/yaft: Fix ARCH.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
09d272245c
commit
a51efde3a9
1 changed files with 36 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# Slackware build script for abella
|
||||
# Slackware build script for yaft
|
||||
# Copyright 2020 Jefferson Rocha <jeffersoncarneiro@slackjeff.com.br>
|
||||
# Copyright 2023 slackjeff <slackjeff@riseup.net>
|
||||
# All rights reserved.
|
||||
|
@ -21,19 +21,28 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# 20231215 bkw: modified by SlackBuilds.org:
|
||||
# - use correct ARCH (this isn't noarch) and SLKCFLAGS.
|
||||
# - include README.md in doc dir.
|
||||
# - add man page symlink for yaft_wall.
|
||||
# - minor tweaks.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=yaft
|
||||
VERSION=${VERSION:-0.2.9}
|
||||
UNPACK=${UNPACK:-v}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
ARCH=noarch
|
||||
|
||||
# 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 "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -45,6 +54,18 @@ OUTPUT=${OUTPUT:-/tmp}
|
|||
|
||||
set -e
|
||||
|
||||
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"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
fi
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
|
@ -54,28 +75,25 @@ 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 {} +
|
||||
|
||||
# Enable Backgroun Draw!
|
||||
BACKGROUND_DRAW=${BACKGROUND_DRAW:-no}
|
||||
[ "$BACKGROUND_DRAW" = 'yes' ] && patch -p1 <${CWD}/sbo-patches/background-drawm.patch
|
||||
|
||||
# Var MANDIR not work.
|
||||
sed -i 's|$(DESTDIR)/usr/share/man|$(DESTDIR)/usr/man|' makefile
|
||||
|
||||
# Generate bin and install
|
||||
make PREFIX=/usr
|
||||
make CFLAGS="$SLKCFLAGS -s"
|
||||
make install DESTDIR=$PKG MANPREFIX=$PKG/usr/man
|
||||
gzip -9 $PKG/usr/man/man*/*
|
||||
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
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
|
||||
# 20231215 bkw: this kinda-sorta documents yaft_wall.
|
||||
ln -s yaft.1.gz $PKG/usr/man/man1/yaft_wall.1.gz
|
||||
|
||||
# Send original Docs and archives
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a ChangeLog LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README.md ChangeLog LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
|
Loading…
Reference in a new issue