summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f57d5034241f62fe82766635ac3a852cf6f2470f (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: hedgeg0d <werstak192@gmail.com>
pkgname=soundux-pipewire
pkgver=0.2.8
pkgrel=4
pkgdesc="A crossplatform soundboard that plays sounds into your microphone, with native PipeWire support"
arch=('x86_64')
url="https://github.com/hedgeg0d/Soundux-pipe"
license=('GPL-3.0-only')
depends=('gtk3' 'webkit2gtk-4.1' 'libappindicator' 'libsoup3' 'openssl' 'libx11' 'libxi' 'libxtst' 'glib2' 'cairo' 'gdk-pixbuf2' 'pango' 'harfbuzz' 'libice' 'libsm')
makedepends=('cmake' 'git')
optdepends=(
  'pipewire: native PipeWire playback and moving applications into the soundboard'
  'libpulse: fallback for systems without PipeWire'
  'libwnck3: application icons in the output picker'
  'yt-dlp: downloading sounds from links'
  'ffmpeg: converting downloaded sounds'
)
provides=('soundux')
conflicts=('soundux' 'soundux-git')
source=("$pkgname::git+$url.git#tag=v$pkgver-pipewire-3")
sha256sums=('SKIP')

prepare() {
  cd "$pkgname"
  git submodule update --init --recursive
}

build() {
  cmake -B build -S "$pkgname" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DSYSTEM_INSTALL=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  #  > Only ship the program itself, the vendored libraries also install headers and cmake files
  rm -rf "$pkgdir/usr/include" "$pkgdir/usr/share/cmake"

  #  > Ship the program under its plain name instead of a versioned file next to a symlink
  for binary in "$pkgdir"/usr/bin/soundux-*; do
    [ -e "$binary" ] && mv -f "$binary" "$pkgdir/usr/bin/soundux"
  done

  install -Dm644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}