diff options
Diffstat (limited to 'development/device-tree-compiler/device-tree-compiler.SlackBuild')
-rw-r--r-- | development/device-tree-compiler/device-tree-compiler.SlackBuild | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/development/device-tree-compiler/device-tree-compiler.SlackBuild b/development/device-tree-compiler/device-tree-compiler.SlackBuild index 58b655f1fa..230558bc53 100644 --- a/development/device-tree-compiler/device-tree-compiler.SlackBuild +++ b/development/device-tree-compiler/device-tree-compiler.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Device Tree Compiler @@ -24,10 +24,18 @@ # With tweaks from rworkman to use in SlackBuilds.org tree +# 20231120 bkw: modified by SlackBuilds.org: add -j1 to make command, +# since parallel builds don't work. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=device-tree-compiler -VERSION=${VERSION:-1.4.4} +VERSION=${VERSION:-1.6.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCNAM=dtc if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,7 +45,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} @@ -56,22 +68,26 @@ else LIBDIRSUFFIX="" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -cd $PRGNAM-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$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 -p1 < $CWD/fix-python-destdir-usage.diff -make clean -make CFLAGS="$SLKCFLAGS" PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} -make install PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG +make -j1 clean +make -j1 CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} +make -j1 install PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} 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 @@ -86,4 +102,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 |