From c6825afff435317c8c6422c28a3bf3f95a648834 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 30 Dec 2021 15:13:40 -0500 Subject: audio/mididings: Updated for version 20151117_bbec99a. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- audio/mididings/README | 2 ++ audio/mididings/git2tarxz.sh | 44 +++++++++++++++++++++++++++++++++ audio/mididings/mididings.SlackBuild | 48 +++++++++++++++++++++++++----------- audio/mididings/mididings.info | 8 +++--- 4 files changed, 84 insertions(+), 18 deletions(-) create mode 100644 audio/mididings/git2tarxz.sh diff --git a/audio/mididings/README b/audio/mididings/README index 1c312f798c83..686f56d6df55 100644 --- a/audio/mididings/README +++ b/audio/mididings/README @@ -8,3 +8,5 @@ on Linux. Features: - Modifying and converting MIDI events - Seamless switching between patches - MIDI event monitoring, running external commands + +For API documentation, see: http://dsacre.github.io/mididings/doc/ diff --git a/audio/mididings/git2tarxz.sh b/audio/mididings/git2tarxz.sh new file mode 100644 index 000000000000..0ec2387f838d --- /dev/null +++ b/audio/mididings/git2tarxz.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Create source tarball from git repo, with generated version +# number. + +# Note that this script doesn't need to be run as root. It does +# need to be able to write to the current directory it's run from. + +# Takes one optional argument, which is the commit or tag to create +# a tarball of. With no arg, HEAD is used. + +PRGNAM=mididings +CLONE_URL=https://github.com/dsacre/mididings + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +if [ "$1" != "" ]; then + git reset --hard "$1" || exit 1 +fi + +GIT_SHA=$( git rev-parse --short HEAD ) + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +VERSION=${DATE}_${GIT_SHA} + +rm -rf .git +find . -name .gitignore -print0 | xargs -0 rm -f + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +echo +echo "Created tarball: $PRGNAM-$VERSION.tar.xz" +echo "VERSION=$VERSION" diff --git a/audio/mididings/mididings.SlackBuild b/audio/mididings/mididings.SlackBuild index f67da5ce5ac0..8038f87e1304 100644 --- a/audio/mididings/mididings.SlackBuild +++ b/audio/mididings/mididings.SlackBuild @@ -6,10 +6,31 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211230 bkw: +# - updated for v20151117_bbec99a. +# - don't install doc/*, it's the *source* for the documentation. +# - do install doc/examples, it's just python code. + +# Notes to self: + +# The documentation for mididings requires an archaic version of +# Sphinx to build it. Modern Sphinx (4.2 on SBo) won't work. Rather +# than diving into that rabbit hole, I'm just adding a link to the +# docs on upstream's site. + +# Debian has man pages for mididings and livedings, but they're +# horribly outdated (2010). Don't include here. + +# Previous versions were built with libsmf, and could process MIDI +# files as-is. This version needs pysmf for that purpose, and we don't +# (yet) have it on SBo, so there's no MIDI file support. However, you +# could always use a MIDI player to play a file and connect its output +# to mididings, so it's not a show-stopper. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=mididings -VERSION=${VERSION:-20120419} +VERSION=${VERSION:-20151117_bbec99a} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +43,6 @@ if [ -z "$ARCH" ]; then esac fi -# 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 @@ -54,22 +72,24 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# "async" is a keyword in recent pythons, code uses it as a variable name. +sed -i 's,async,is_async,g' $PRGNAM/units/call.py + +# make it look for e.g. -lboost_python39.so (not -lboost_python-py39.so). +sed -i '/^boost_python_suffixes/s,-py,,' setup.py -python setup.py install --root=$PKG --enable-smf +python3 setup.py install --root=$PKG --enable-smf -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +strip $PKG/usr/lib*/py*/site-*/*.so mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING NEWS PKG-INFO README doc/* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING NEWS README doc/examples $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/audio/mididings/mididings.info b/audio/mididings/mididings.info index 390a62960021..cdbd38562970 100644 --- a/audio/mididings/mididings.info +++ b/audio/mididings/mididings.info @@ -1,10 +1,10 @@ PRGNAM="mididings" -VERSION="20120419" +VERSION="20151117_bbec99a" HOMEPAGE="http://das.nasophon.de/mididings/" -DOWNLOAD="http://das.nasophon.de/download/mididings-20120419.tar.gz" -MD5SUM="5d4b642a1b76817b742f01cda60c0a3f" +DOWNLOAD="https://slackware.uk/~urchlay/src/mididings-20151117_bbec99a.tar.xz" +MD5SUM="5e5c8f28ded3ac58f7d0913ef091f6a8" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="jack libsmf pyliblo decorator" +REQUIRES="jack pyliblo decorator" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" -- cgit v1.2.3