summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6e5c0477ef58569611f732c892cc6d65298c880b (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
# Maintainer: Tobias Boesch <tobias.boesch at googlemail.com>

pkgname=('fs2-knossos-dotnet')
pkgver=v1.2.4
_extpkgname='Knossos.NET'
pkgrel=1
pkgdesc="A multi platform launcher for Freespace 2 Open using .NET 6.0 and AvaloniaUI"
arch=('x86_64')
url='https://github.com/KnossosNET/Knossos.NET'
_commit='10768622a1da1176df701662a98646dabe2af2ca'  # Upstream only signs commits, not tags. Using commit to be able to verify the source.
                                                    # https://github.com/KnossosNET/Knossos.NET/commit/10768622a1da1176df701662a98646dabe2af2ca
license=('GPL-3.0-only')
makedepends=(
  'dotnet-sdk-6.0'
  'git'
)
depends=(
  'gcc-libs'
  'glibc'
  'hicolor-icon-theme'
  'dotnet-runtime-6.0'
)
conflicts=(
)
validpgpkeys=(
  968479A1AFF927E37D1A566BB5690EEEBB952194  # Fingerprint from gpg
                                            # Key from
                                            #   https://github.com/web-flow.gpg
)
source=(
  "git+$url.git#commit=${_commit}?signed"
  'Knossos.NET.desktop'
)
sha512sums=('SKIP'
            '088987d8d0b9ee329c3602f56521e9322feb1dd53d84eccc501dfea25cc00b70f10d9cfc00971848fb41251cd124df45522fd6384fe4ad83748642a05e8a7bfa')
options=(
  !strip # Stripping file Knossos.NET seems to destroy it
)

build() {
  cd "$_extpkgname"
  dotnet publish --framework net6.0 --arch x64 --os linux -p:PublishSingleFile=true --self-contained false $_extpkgname/$_extpkgname.csproj
}

package() {
  install -D -m755 "${srcdir}/$_extpkgname/$_extpkgname/bin/Debug/net6.0/linux-x64/publish/$_extpkgname" "${pkgdir}/usr/bin/$_extpkgname"
  install -D -m644 "${srcdir}/$_extpkgname/packaging/linux/knossos-256.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/$_extpkgname.png"
  install -D -m644 "${srcdir}/Knossos.NET.desktop" "${pkgdir}/usr/share/applications/Knossos.NET.desktop"
}