summaryrefslogtreecommitdiffstats
path: root/audio/acousticbrainz-music-extractor/acousticbrainz-music-extractor.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/acousticbrainz-music-extractor/acousticbrainz-music-extractor.SlackBuild')
-rw-r--r--audio/acousticbrainz-music-extractor/acousticbrainz-music-extractor.SlackBuild52
1 files changed, 31 insertions, 21 deletions
diff --git a/audio/acousticbrainz-music-extractor/acousticbrainz-music-extractor.SlackBuild b/audio/acousticbrainz-music-extractor/acousticbrainz-music-extractor.SlackBuild
index 20258fa217..a901cf30e6 100644
--- a/audio/acousticbrainz-music-extractor/acousticbrainz-music-extractor.SlackBuild
+++ b/audio/acousticbrainz-music-extractor/acousticbrainz-music-extractor.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for "acousticbrainz-music-extractor".
@@ -24,21 +24,33 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20240329 bkw: BUILD=2.
+# - take over maintenance.
+# - original downloads have gone away and aren't mirrored anywhere I can
+# find. the new downloads are repacks (different md5sums) with slightly
+# different filenames, so the script had to be modified for them.
+# - include upstream's documentation in the package.
+
+# TODO: what about all the other streaming_* binaries in the tarball?
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=acousticbrainz-music-extractor
-SRCNAM=essentia-extractor
+SRCNAM=essentia-extractors
VERSION=${VERSION:-v2.1_beta2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-if [ "$ARCH" = "i486" ]; then
+if [ "$ARCH" = "i586" ]; then
ARCH=i686
elif [ "$ARCH" = "i686" ]; then
ARCH=i686
@@ -49,7 +61,11 @@ else
exit 1
fi
-CWD=$(pwd)
+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}
@@ -59,28 +75,22 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-mkdir -p $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION-linux-$ARCH.tar.gz
+cd $SRCNAM-$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 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+chmod 644 *
mkdir -p $PKG/usr/bin
-cp -a streaming_extractor_music $PKG/usr/bin
-
-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 -s -m0755 streaming_extractor_music $PKG/usr/bin
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a *.rst *.txt $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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