blob: fe80c32202768e98e89b375eade36902fae3ec44 (
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
|
# Maintainer: Yast <yastcher@gmail.com>
pkgname=tapeback
pkgver=0.10.2
pkgrel=1
pkgdesc="Local meeting recorder with transcription and speaker diarization for Obsidian"
arch=('any')
url="https://github.com/yastcher/tapeback"
license=('Apache-2.0')
depends=(
'python'
'ffmpeg'
'pulse-native-provider'
)
optdepends=(
'cuda: GPU-accelerated transcription and diarization'
)
makedepends=('python-pip')
# The venv holds prebuilt wheels with no debug symbols to split out: with makepkg's
# default `debug` option every .so failed debugedit and a useless tapeback-debug
# package was built next to the real one.
options=('!debug')
source=("$pkgname-$pkgver.tar.gz::https://github.com/yastcher/tapeback/archive/v$pkgver.tar.gz")
sha256sums=('4fe3427fda26b33e424eefc1b4479ef1249c4992cb03e7fd6523c9c8213f6a9e')
build() {
cd "$pkgname-$pkgver"
python -m venv --system-site-packages "$srcdir/venv"
"$srcdir/venv/bin/pip" install --no-cache-dir .
}
package() {
# Install venv to /opt
install -d "$pkgdir/opt/$pkgname"
cp -a "$srcdir/venv"/* "$pkgdir/opt/$pkgname/"
# Fix shebangs: replace build-time venv path with install-time path
find "$pkgdir/opt/$pkgname/bin" -type f -exec \
sed -i "1s|#!.*$srcdir/venv/bin/python[^ ]*|#!/opt/$pkgname/bin/python|" {} \;
# Fix venv home path
sed -i "s|$srcdir/venv|/opt/$pkgname|g" "$pkgdir/opt/$pkgname/pyvenv.cfg"
# Create wrapper script
install -d "$pkgdir/usr/bin"
cat > "$pkgdir/usr/bin/tapeback" << 'WRAPPER'
#!/bin/sh
exec /opt/tapeback/bin/tapeback "$@"
WRAPPER
chmod 755 "$pkgdir/usr/bin/tapeback"
# License
cd "$pkgname-$pkgver"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|