summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d4840c11c76dcc9ee7cc58d3a9d5e032b0373004 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: CxOrg <clx.org@cloud-org.uk>
# Contributor: Felix Häcker <haeckerfelix@gnome.org>
pkgname=shortwave-mpris-git
pkgver=5.1.0.r9.g9586a15
pkgrel=1
pkgdesc="Internet radio player with extended MPRIS support, device support for DLNA/UPnP & Google Cast + FFmpeg proxy for incompatible streams"
arch=('x86_64' 'aarch64')
url="https://github.com/ixnewton/Shortwave-MPRIS"
license=('GPL3')
depends=(
    'gtk4>=4.18.0'
    'libadwaita>=1.8.0'
    'libshumate>=1.3.0'
    'gstreamer>=1.24.0'
    'gst-plugins-base-libs>=1.24.0'
    'gst-plugins-bad>=1.24.0'
    'gst-plugins-good'
    'gst-libav'
    'ffmpeg>=4.0.0'
    'sqlite>=3.20.0'
    'openssl>=1.0.0'
    'dbus'
    'glib2>=2.80.0'
    'glycin-gtk4>=2.0.0'
    'lcms2>=2.12.0'
    'libseccomp>=2.5.0'
)
makedepends=('git' 'rust>=1:1.82.0' 'cargo' 'pkgconf' 'meson' 'ninja' 'blueprint-compiler' 'desktop-file-utils' 'appstream-glib' 'glib2')
provides=('shortwave' 'shortwave-mpris')
conflicts=('shortwave' 'shortwave-mpris' 'shortwave-mpris-bin')
options=('!lto')
install=shortwave-mpris-git.install
source=("git+$url.git#branch=master")
sha256sums=('SKIP')

pkgver() {
  cd "Shortwave-MPRIS"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "Shortwave-MPRIS"
  # Set up Rust toolchain
  export RUSTUP_TOOLCHAIN=stable
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd "Shortwave-MPRIS"
  
  # Set up Rust environment
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  
  # Build with release profile
  arch-meson . build \
    --buildtype=release \
    -Dprofile=default
  
  ninja -C build
}

check() {
  cd "Shortwave-MPRIS"
  # Run tests if needed
  # meson test -C build --print-errorlogs
}

package() {
  cd "Shortwave-MPRIS"
  DESTDIR="$pkgdir" meson install -C build
  
  # Install license
  install -Dm644 COPYING.md "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}