From e326619dd891a2805f40ceca738b453536789329 Mon Sep 17 00:00:00 2001 From: Petr Kletecka Date: Thu, 4 Apr 2024 11:04:46 +0700 Subject: system/dtrx: Updated for version 8.5.3. Signed-off-by: Willy Sudiarto Raharjo --- system/dtrx/dtrx.SlackBuild | 73 ++++++++++++++++++++++++++++++++++----------- system/dtrx/dtrx.info | 8 ++--- 2 files changed, 60 insertions(+), 21 deletions(-) (limited to 'system') diff --git a/system/dtrx/dtrx.SlackBuild b/system/dtrx/dtrx.SlackBuild index 6deead44da..e28280c20d 100644 --- a/system/dtrx/dtrx.SlackBuild +++ b/system/dtrx/dtrx.SlackBuild @@ -2,22 +2,42 @@ # Slackware build script for dtrx -# Petr Kletecka petr@kle.cz <2020> +# Copyright 2024 Petr Kletecka Orlando, FL +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 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 +# 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, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# 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=dtrx -VERSION=${VERSION:-7.1} -ARCHIVE=${ARCHIVE:-671ccf7d1b7ea90a6e6e6cc44234ef14874d59bf} +VERSION=${VERSION:-8.5.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -ARCH=noarch +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + 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 @@ -27,27 +47,46 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -unzip -o $CWD/$PRGNAM-$ARCHIVE.zip -cd $PRGNAM-$ARCHIVE +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +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 \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -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 {} \; + +python3 -m build --wheel --no-isolation +python3 -m installer --destdir "$PKG" dist/*.whl -python setup.py install --prefix $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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/system/dtrx/dtrx.info b/system/dtrx/dtrx.info index 411479487b..9128edce7e 100644 --- a/system/dtrx/dtrx.info +++ b/system/dtrx/dtrx.info @@ -1,10 +1,10 @@ PRGNAM="dtrx" -VERSION="7.1" +VERSION="8.5.3" HOMEPAGE="https://github.com/brettcs/dtrx" -DOWNLOAD="https://github.com/brettcs/dtrx/archive/671ccf7d1b7ea90a6e6e6cc44234ef14874d59bf/dtrx-671ccf7d1b7ea90a6e6e6cc44234ef14874d59bf.zip" -MD5SUM="80a5abf4324824e3bcaf70d03db37bdb" +DOWNLOAD="https://github.com/dtrx-py/dtrx/releases/download/8.5.3/dtrx-8.5.3.tar.gz" +MD5SUM="cc1039aff57398b8c31a255ddaf5c737" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="python3-build python3-wheel" MAINTAINER="Petr Kletecka" EMAIL="petr@kle.cz" -- cgit v1.2.3