summaryrefslogtreecommitdiffstats
path: root/multimedia/acetoneiso/acetoneiso.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/acetoneiso/acetoneiso.SlackBuild')
-rw-r--r--multimedia/acetoneiso/acetoneiso.SlackBuild119
1 files changed, 73 insertions, 46 deletions
diff --git a/multimedia/acetoneiso/acetoneiso.SlackBuild b/multimedia/acetoneiso/acetoneiso.SlackBuild
index 8a74085826..edd78e39b6 100644
--- a/multimedia/acetoneiso/acetoneiso.SlackBuild
+++ b/multimedia/acetoneiso/acetoneiso.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
-#
-# Slackware build script for acetoneiso.
-#
+#!/bin/bash
+
+# Slackware build script for acetoneiso
+
# Copyright 2016-2020 Edinaldo P. Silva, Rio de Janeiro, Brazil.
+# Copyright 2022 Vijay Marcel
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,47 +23,85 @@
# 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=acetoneiso
-VERSION=${VERSION:-2.4}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.4.3}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
+ i?86)
+ DEBARCH=i386
+ ARCH=i586
+ LIBDIRSUFFIX=""
+ ;;
+ x86_64)
+ DEBARCH=amd64
+ ARCH=x86_64
+ LIBDIRSUFFIX="64"
+ ;;
+ # unsupported
+ *)
+ echo "ARCH $( uname -m ) is unsupported"
+ exit 1
+ ;;
+ esac
+else
+ case "$ARCH" in
+ i?86)
+ DEBARCH=i386
+ LIBDIRSUFFIX=""
+ ;;
+ x86_64)
+ DEBARCH=amd64
+ LIBDIRSUFFIX="64"
+ ;;
+ # unsupported
+ *)
+ echo "$ARCH is unsupported"
+ exit 1
+ ;;
esac
fi
-CWD=$(pwd)
+# 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
+
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"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
+trap 'echo "$0 FAILED at line $LINENO!" | tee -a $OUTPUT/error-${PRGNAM}.log' ERR
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/${PRGNAM}_${VERSION}.orig.tar.gz
-mv ${PRGNAM}${VERSION} $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
+mkdir -pv $PRGNAM
+cd $PRGNAM
+
+if [ "$DEBARCH" = "i386" ]; then
+ mv -v $CWD/acetoneiso_2.4-3+b1_i386.deb $CWD/$PRGNAM-$VERSION.deb
+ ar -x $CWD/$PRGNAM-$VERSION.deb
+ tar xvf data.tar.xz -C $PKG
+elif [ "$DEBARCH" = "amd64" ]; then
+ mv -v $CWD/acetoneiso_2.4-3+b1_amd64.deb $CWD/$PRGNAM-$VERSION.deb
+ ar -x $CWD/$PRGNAM-$VERSION.deb
+ tar xvf data.tar.xz -C $PKG
+else
+ echo "This program is not supported for your System Architecture"
+fi
+
+cd $PKG
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,37 +109,25 @@ 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 {} \;
-cd $PRGNAM/sources
- sed -i 's#<Phonon/#<phonon/#' erase_cd.cpp erase_dvd.cpp \
- burn_iso_2_cd.cpp burn_iso_2_dvd.cpp
cd ..
-qmake
-make
-make install 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
-install -d $PKG/usr/{bin,share/{acetoneiso,applications,pixmaps}}
-install -D -m755 $CWD/acetoneiso $PKG/usr/bin/acetoneiso
-install -D -m755 acetoneiso $PKG/usr/share/acetoneiso/acetoneiso
-cp -a {images,locale,manual,ui} $PKG/usr/share/acetoneiso
-install -D -m644 menu/AcetoneISO.desktop $PKG/usr/share/applications/AcetoneISO.desktop
-install -D -m644 images/Acetino2.png $PKG/usr/share/pixmaps/Acetino2.png
+mv -v $PKG/usr/share/man $PKG/usr/
+rm -rvf $PKG/usr/share/man
-DOCS="../AUTHORS ../CHANGELOG ../FEATURES ../LICENSE ../README ../TODO"
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+mv -v $PKG/usr/share/doc/acetoneiso/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rvf $PKG/usr/share/doc/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# create a symlink to unrar-nonfree:
-ln -s /usr/bin/unrar $PKG/usr/bin/unrar-nonfree
-
mkdir -p $PKG/install
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