summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3f983e6e27ae6616c612544103f04295f843a099 (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
# Maintainer: Palash <via github.com/debpalash>
# AUR binary package for Opal — repackages the official release tarball.
# push-to-aur.sh replaces pkgver from the release tag before publication and
# updpkgsums fills the checksum once that artifact is public.
pkgname=opal-media-player-bin
pkgver=0.9.6
pkgrel=1
pkgdesc="Play everything — media player, universal search, torrent streaming, local AI (official binary)"
arch=('x86_64')
url="https://github.com/debpalash/Opal"
license=('GPL-3.0-only')
provides=("opal-media-player=$pkgver")
conflicts=('opal-media-player')
depends=(
    'mpv'
    'sdl2'
    'sqlite'
    'libtorrent-rasterbar'
    'curl'
    'ffmpeg'
)
optdepends=(
    'yt-dlp: YouTube playback and downloads'
    'streamlink: live stream resolution'
    'onnxruntime: OCR bubble detection'
    'python: voice helper scripts (STT/TTS servers)'
)
source=("https://github.com/debpalash/Opal/releases/download/v$pkgver/opal-$pkgver-linux-x86_64.tar.gz")
sha256sums=('551a9896c79484cbd69442e524534571fbf40dd2848fb52c5ef79fdad947cc98')

package() {
    cd "opal-$pkgver-linux-x86_64"

    # The binary's rpath includes $ORIGIN/../lib/opal, so the wrapper lib
    # resolves from /usr/lib/opal without ldconfig fiddling.
    install -Dm755 opal                       "$pkgdir/usr/bin/opal"
    install -Dm755 opal-mcp                   "$pkgdir/usr/bin/opal-mcp"
    install -Dm755 libtorrent_wrapper.so      "$pkgdir/usr/lib/opal/libtorrent_wrapper.so"
    cp -r engines                             "$pkgdir/usr/lib/opal/engines"
    install -Dm755 scripts/camoufox_bridge.py "$pkgdir/usr/lib/opal/scripts/camoufox_bridge.py"
    cp -r web                                "$pkgdir/usr/lib/opal/web"
    install -Dm644 plugins-manifest.json      "$pkgdir/usr/lib/opal/plugins-manifest.json"
    install -Dm644 manga-sources-sfw.json     "$pkgdir/usr/lib/opal/manga-sources-sfw.json"
    install -Dm644 opal.desktop               "$pkgdir/usr/share/applications/opal.desktop"
    install -Dm644 opal.svg                   "$pkgdir/usr/share/icons/hicolor/scalable/apps/opal.svg"
    install -Dm644 licenses/libwebp.txt "$pkgdir/usr/share/licenses/$pkgname/libwebp.txt"
    install -Dm644 LICENSE                    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}