summaryrefslogtreecommitdiffstats
path: root/development/arm-binutils/arm-binutils.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/arm-binutils/arm-binutils.SlackBuild')
-rw-r--r--development/arm-binutils/arm-binutils.SlackBuild45
1 files changed, 26 insertions, 19 deletions
diff --git a/development/arm-binutils/arm-binutils.SlackBuild b/development/arm-binutils/arm-binutils.SlackBuild
index 727d920f08..1b102605bd 100644
--- a/development/arm-binutils/arm-binutils.SlackBuild
+++ b/development/arm-binutils/arm-binutils.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for arm-binutils
@@ -22,15 +22,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220408 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - fix doc ownership, if $CWD isn't owned by root.
+
# based on the work of:
# Marek Buras <cyfr0n (at) go2 !dot pl>,
# Vliegendehuiskat <vliegendehuiskat [at] gmail [dot] com> and
# Claudio Henrique Fortes Felix <felix.claudio [at] gmail [dot] com>.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=arm-binutils
-VERSION=${VERSION:-2.32}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.35}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -40,7 +46,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}
@@ -65,14 +75,15 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf binutils-$VERSION
-tar xvf $CWD/binutils-$VERSION.tar.xz
+tar xvf $CWD/binutils-$VERSION.tar.?z
cd binutils-$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 {} \+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -91,26 +102,22 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-multilib \
--disable-nls \
--disable-werror \
- --disable-libssp \
--with-system-zlib \
--with-gnu-as \
--with-gnu-ld
make
-make install DESTDIR=$PKG
-
-find $PKG | xargs 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 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+make install-strip DESTDIR=$PKG
# Don't overwrite files from Slackware's binutils
-rm -rf $PKG/usr/info
-rm -rf $PKG/usr/man
+rm -rf $PKG/usr/info $PKG/usr/man
+# 20220408 bkw: don't change the install command below back to "cp -a"
+# please. configure_options.txt comes from $CWD and could be owned by
+# anyone.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING* ChangeLog MAINTAINERS README* $CWD/configure_options.txt \
+install -m0644 -oroot -groot \
+ COPYING* ChangeLog MAINTAINERS README* $CWD/configure_options.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -118,4 +125,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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