summaryrefslogtreecommitdiffstats
path: root/audio/transcribe/transcribe.SlackBuild
blob: 241deeec128b7cd1d8246b02e49b8f643b1fe7c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh

# Slackware build script for transcribe

# Written by B. Watson (yalhcru@gmail.com)

# Notes:

# Closed-source software, precompiled binary for x86, 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/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).

# ARCH is hard-coded to i486 because the bin is 32-bit x86. If you're
# on Slackware64, try alienBOB's -compat32 (multilib) packages. The
# author of this script was able to get the app to work that way.

# 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).

# Annoyingly, the in-app "Buy" button doesn't work. It's supposed to
# open a browser & display the order form on their site.. It's looking for
# something in /usr/share/applnk (I suppose to tell it which browser
# to use), but this dir is empty on modern Slackware.

# 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)

PRGNAM=transcribe
VERSION=${VERSION:-8.10.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

ARCH=i486
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# The dist tarball's filename has no connection whatsoever to
# the actual name of the program...
TARNAME=xscsetup.tar.gz

# No LIBDIRSUFFIX stuff here, it's a 32-bit-only app. Also, the
# binary is already stripped.

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/$TARNAME
cd $PRGNAM

mkdir -p $PKG/usr/lib/$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/$PRGNAM/
install -oroot -groot -m0644 xschelp.htb $PKG/usr/lib/$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 $CWD/$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}