summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGeorge Rawlinson2022-12-28 21:47:02 +1300
committerGeorge Rawlinson2022-12-28 21:47:02 +1300
commit701de8c782ea410201c5ef577be3107fc18600da (patch)
tree3f25166122b72db09167de6f443d0dc5ef7eea15 /PKGBUILD
parent501c31bd3281b8b6c9c1ff226a95ab6e47369b18 (diff)
downloadaur-701de8c782ea410201c5ef577be3107fc18600da.tar.gz
upgpkg: mididings 20221228.r730-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD105
1 files changed, 78 insertions, 27 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8d5629a044df..6288f07cebde 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,88 @@
-# Maintainer: Lieven Moors <lievenmoors@protonmail.com>
+# Maintainer: George Rawlinson <grawlinson@archlinux.org>
+# Contributor: Lieven Moors <lievenmoors@protonmail.com>
# Contributor: Leonard de Ruijter <dev@systeemdenker.nl>
# Contributor: speps <speps at aur dot archlinux dot org>
-pkgname=mididings
-pkgver=20120419
-pkgrel=2
-pkgdesc="A MIDI router and processor based on Python, supporting ALSA and JACK MIDI"
-arch=('i686' 'x86_64')
-url="http://das.nasophon.de/mididings/"
-license=('GPL')
-depends=('boost-libs' 'python2-decorator' 'jack' 'libsmf')
-makedepends=('boost')
-optdepends=('python2-dbus: to send DBUS messages'
- 'python2-pyliblo: to send or receive OSC messages'
- 'python2-pyinotify: to automatically restart when a script changes')
-source=("http://das.nasophon.de/download/$pkgname-$pkgver.tar.gz")
-md5sums=('5d4b642a1b76817b742f01cda60c0a3f')
+pkgbase=mididings
+pkgname=('mididings' 'mididings-docs')
+pkgver=20221228.r730.g6079f9f
+pkgrel=1
+pkgdesc='A MIDI router & processor, supporting ALSA & JACK'
+arch=('x86_64')
+url='https://github.com/mididings/mididings'
+license=('GPL2')
+makedepends=(
+ 'git'
+ 'boost'
+ 'boost-libs'
+ 'alsa-lib'
+ 'jack'
+ 'python'
+ 'python-decorator'
+ 'python-build'
+ 'python-installer'
+ 'python-wheel'
+ 'python-setuptools'
+)
+checkdepends=('python-pytest')
+_commit='6079f9f2c1774f06fa6cf2432f5276ab040f6f01'
+source=("$pkgbase::git+https://github.com/mididings/mididings#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+ cd "$pkgbase"
+
+ local commit_date="$(git show --no-patch --format=%cd --date=format:%Y%m%d)"
+ local commit_count="$(git rev-list --count HEAD)"
+ local commit_hash="$(git rev-parse --short HEAD)"
+
+ printf '%s.r%s.g%s' "$commit_date" "$commit_count" "$commit_hash"
+}
build() {
- cd "$srcdir/$pkgname-$pkgver"
- python2 setup.py build --enable-smf
+ cd "$pkgbase"
+
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "$pkgbase"
+
+ local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
+
+ PYTHONPATH="build/lib.linux-$CARCH-cpython-$python_version:$PYTHONPATH" pytest -v
+}
+
+package_mididings() {
+ depends=(
+ 'boost-libs'
+ 'jack'
+ 'alsa-lib'
+ 'python'
+ 'python-decorator'
+ )
+ optdepends=(
+ 'python-dbus: send DBUS messages'
+ 'python-pyinotify: automatically restart when a script changes'
+ 'python-pyliblo: send/recieve OSC messages'
+ 'python-pysmf: read/write standard MIDI files using the process_file() function'
+ 'python-pyxdg: so mididings knows where to look for config files'
+ 'tcl: for livedings GUI'
+ 'mididings-docs: documentation'
+ )
+
+ cd "$pkgbase"
+
+ python -m installer --destdir="$pkgdir" dist/*.whl
}
-package() {
- cd "$srcdir/$pkgname-$pkgver"
- python2 setup.py install --prefix=/usr --root=$pkgdir
+package_mididings-docs() {
+ pkgdesc+=' (documentation)'
- # docs
- install -d "$pkgdir/usr/share/doc/$pkgname/examples"
- install -Dm644 doc/*.* \
- "$pkgdir/usr/share/doc/$pkgname"
+ cd "$pkgbase"
- # examples
- install -Dm644 doc/examples/* \
- "$pkgdir/usr/share/doc/$pkgname/examples"
+ # documentation
+ install -vDm644 -t "$pkgdir/usr/share/doc/$pkgbase" README
+ cp -vr doc/examples "$pkgdir/usr/share/doc/$pkgbase"
+ cp -vr doc-html "$pkgdir/usr/share/doc/$pkgbase/html"
}