mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
98 lines
2.8 KiB
Bash
98 lines
2.8 KiB
Bash
#!/bin/sh
|
|
|
|
# Slackware build script for transcribe
|
|
|
|
# Written by B. Watson (yalhcru@gmail.com)
|
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
# Notes:
|
|
|
|
# Closed-source software, precompiled binaries for x86 and x86_64,
|
|
# deps are all included in Slackware.
|
|
|
|
# Originally ported from Windows, so it expects to be run from its
|
|
# own directory. We install to /usr/lib(64)?/transcribe, and a wrapper
|
|
# script /usr/bin/transcribe that cd's to the install dir and runs
|
|
# the app from there (this allows the app's help system to work).
|
|
|
|
# Upgrading from the 30-day eval to the registered version is just
|
|
# a matter of entering the license key (no change to the package
|
|
# needed).
|
|
|
|
# The version number doesn't appear in the tarball filename or the URL,
|
|
# so be careful that $VERSION matches the actual version number (found
|
|
# in Help/About)
|
|
|
|
# If you run transcribe from a terminal, you'll see:
|
|
# sh: lsb_release: command not found
|
|
# These errors don't seem to actually cause any harm (app runs fine), but
|
|
# I don't want to try to suppress them in the wrapper script either.
|
|
|
|
PRGNAM=transcribe
|
|
VERSION=${VERSION:-8.40}
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-_SBo}
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
case "$( uname -m )" in
|
|
i?86) ARCH=i486 ;;
|
|
arm*) ARCH=arm ;;
|
|
*) ARCH=$( uname -m ) ;;
|
|
esac
|
|
fi
|
|
|
|
CWD=$(pwd)
|
|
TMP=${TMP:-/tmp/SBo}
|
|
PKG=$TMP/package-$PRGNAM
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
LIBDIRSUFFIX=""
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
LIBDIRSUFFIX=""
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
LIBDIRSUFFIX="64"
|
|
else
|
|
echo "Unsupported ARCH '$ARCH', this package probably won't work"
|
|
sleep 5
|
|
LIBDIRSUFFIX=""
|
|
fi
|
|
|
|
# The dist tarball's filename has no connection whatsoever to
|
|
# the actual name of the program...
|
|
TARNAME=xsc${LIBDIRSUFFIX}setup.tar.gz
|
|
|
|
set -e
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
cd $TMP
|
|
rm -rf $PRGNAM
|
|
tar xvf $CWD/$TARNAME
|
|
cd $PRGNAM
|
|
|
|
sed "s,/usr/lib,/usr/lib$LIBDIRSUFFIX,g" \
|
|
< $CWD/$PRGNAM.sh \
|
|
> $PRGNAM.sh
|
|
|
|
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM \
|
|
$PKG/usr/doc/$PRGNAM-$VERSION \
|
|
$PKG/usr/bin \
|
|
$PKG/install \
|
|
$PKG/usr/share/applications \
|
|
$PKG/usr/share/pixmaps
|
|
|
|
install -oroot -groot -m0755 $PRGNAM $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/
|
|
install -oroot -groot -m0644 xschelp.htb $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/
|
|
install -oroot -groot -m0644 readme_gtk.html $PKG/usr/doc/$PRGNAM-$VERSION/
|
|
install -oroot -groot -m0644 gtkicons/xsc128x128.png $PKG/usr/share/pixmaps/
|
|
install -oroot -groot -m0755 $PRGNAM.sh $PKG/usr/bin/$PRGNAM
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
|
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}
|