summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 55ce31e0b28290a6a59a8c4f2c38668ce0118817 (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
# Maintainer: Andrej Halveland (SnipeX_ / SnipeX) <andrej.halv@gmail.com>
#
# Based on the AUR package by:
# Maintainer: Dušan Mitrović <dusan@dusanmitrovic.xyz>

pkgname=supersonic-desktop-wayland-git
pkgver=v0.8.2.r51.gee275cb
pkgrel=1
pkgdesc="A lightweight cross-platform desktop client for Subsonic music servers"
_pkgname="supersonic-desktop"
_appname="supersonic"
arch=('x86_64')
url="https://github.com/dweymouth/supersonic"
license=('GPL3')
depends=(
    'glibc'
    'libglvnd'
    'libx11'
    'mpv'
)
optdepends=(
    "libappindicator-gtk3: Systray indicator support"
    "org.freedesktop.secrets: Keyring password store support"
)
makedepends=('go>=1.17' 'git')
provides=('supersonic-desktop')
conflicts=('supersonic-desktop')
source=(
    "git+${url}.git"
)
sha256sums=(
    "SKIP"
)

pkgver() {
  cd "$_appname"
  git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  export GOPATH="$srcdir"/gopath

  cd "$srcdir/${_appname}"

  go build -mod=readonly -modcacherw -tags=wayland .
}

package() {
  cd "$srcdir/${_appname}"
  _output="${srcdir}/${_appname}"

  install -Dm755 "${_output}/${_appname}" "${pkgdir}/usr/bin/${_pkgname}"
  install -Dm644 "$srcdir/${_appname}/res/appicon.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
  install -Dm644 "$srcdir/${_appname}/res/${_appname}-desktop.desktop" "$pkgdir/usr/share/applications/${_pkgname}.desktop"
}