diff options
Diffstat (limited to 'network/xdman/xdman.SlackBuild')
-rw-r--r-- | network/xdman/xdman.SlackBuild | 111 |
1 files changed, 60 insertions, 51 deletions
diff --git a/network/xdman/xdman.SlackBuild b/network/xdman/xdman.SlackBuild index 62cc10ba4e..83820b7e34 100644 --- a/network/xdman/xdman.SlackBuild +++ b/network/xdman/xdman.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh -# -# Slackware build script for xdman. -# -# Copyright 2015-2018 Edinaldo P. Silva, Rio de Janeiro, Brazil. +#!/bin/bash + +# Slackware build script for xdman + +# Copyright 2023 Vijay Marcel # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,59 +22,50 @@ # 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=xdman -VERSION=${VERSION:-2018.7.2.8} +VERSION=${VERSION:-8.0.29} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +sys_arch=${sys_arch:-$(uname -m)} +SRCNAM=${SRCNAM:-xdman_gtk_} -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac +case "$sys_arch" in + x86_64) + DEBARCH=amd64 + ARCH=x86_64 + LIBDIRSUFFIX="64" + ;; + *) echo "This program will not build on $sys_arch platform" && exit 1 ;; +esac + +# 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 fi -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e - -SRCNAM=${SRCNAM:-xdm-2018} +trap 'echo "$0 FAILED at line $LINENO!" | tee -a $OUTPUT/error-${PRGNAM}.log' ERR rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -rm -rf $TMP/$PRGNAM-$VERSION cd $TMP - -mkdir -p $PRGNAM-$VERSION - -if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then - tar xvf $CWD/$SRCNAM-x86.tar.xz -C $PRGNAM-$VERSION -elif [ "$ARCH" = "x86_64" ]; then - tar xvf $CWD/$SRCNAM-x64.tar.xz -C $PRGNAM-$VERSION -else - echo "$ARCH is not supported." - exit 1 -fi - +rm -rf $PRGNAM-$VERSION +mkdir -pv $PRGNAM-$VERSION +ar -x $CWD/$SRCNAM${VERSION}_${DEBARCH}.deb --output $TMP/$PRGNAM-$VERSION cd $PRGNAM-$VERSION +tar xvf data.tar.xz -C $PKG +cd .. && cd $PKG + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -82,22 +73,40 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -7z x -y install.sh -install -d -m755 $PKG/opt/xdman -install -D -m644 xdman.jar $PKG/opt/xdman/xdman.jar -install -D -m775 $CWD/xdman $PKG/opt/xdman -install -D -m644 xdman.desktop $PKG/usr/share/applications/xdman.desktop -install -D -m644 icon.png $PKG/usr/share/pixmaps/icon.png +chmod 0750 $PKG/opt/xdman/libmscordaccore.so +chmod 0750 $PKG/opt/xdman/libhostfxr.so +chmod 0750 $PKG/opt/xdman/libmscordbi.so +chmod 0750 $PKG/opt/xdman/libcoreclr.so +chmod 0750 $PKG/opt/xdman/libSystem.Globalization.Native.so +chmod 0750 $PKG/opt/xdman/SQLite.Interop.dll +chmod 0750 $PKG/opt/xdman/libSystem.Native.so +chmod 0750 $PKG/opt/xdman/libhostpolicy.so +chmod 0750 $PKG/opt/xdman/libcoreclrtraceptprovider.so +chmod 0750 $PKG/opt/xdman/libSystem.Security.Cryptography.Native.OpenSsl.so +chmod 0750 $PKG/opt/xdman/createdump +chmod 0750 $PKG/opt/xdman/libSystem.Net.Security.Native.so +chmod 0750 $PKG/opt/xdman/libSystem.IO.Compression.Native.so +chmod 0750 $PKG/opt/xdman/libdbgshim.so +chmod 0750 $PKG/opt/xdman/libclrjit.so + +cd .. + 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 +rm -rvf $PKG/usr/share/applications/xdm-app.destop +install -m0644 $CWD/xdm-app.desktop -t $PKG/usr/share/applications/ + +enscript -B -o $TMP/GPL-2.0.ps $CWD/gpl-2.0.txt + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-SlackBuild +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cp -a $TMP/GPL-2.0.ps $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/install -cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh 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 |