summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: feb75704b23dec40d82e87a8ec085dad5060a5df (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
76
# Maintainer: begin-theadventure <begin-thecontact.ncncb at dralias dot com>

pkgname=alfae
pkgver=1.4.3
pkgrel=1
pkgdesc="An Itch.io/Epic Games/GOG launcher that works through plugins"
url="https://github.com/suchmememanyskill/Alfae"
license=('GPL-3.0-or-later')
arch=('x86_64')
depends=('legendary' 'heroic-gogdl')
makedepends=('dotnet-sdk' 'git')
options=('!strip')
source=("git+$url.git#tag=$pkgver")
sha256sums=('SKIP')

prepare() {
# Create a shortcut
  echo -e "[Desktop Entry]\n\
Name=Alfae\n\
Icon=alfae\n\
Exec=/opt/Alfae/Alfae %U\n\
Terminal=false\n\
Type=Application\n\
StartupWMClass=Alfae\n\
Comment=An Itch.io/Epic Games/GOG launcher that works through plugins\n\
Categories=Game;" > alfae.desktop
}

build() {
  export NUGET_PACKAGES="$srcdir/NUGET_PACKAGES"
  export DOTNET_NOLOGO=true
  export DOTNET_CLI_TELEMETRY_OPTOUT=true
  export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
  cd Alfae

  cd LocalGames
  dotnet publish -o ../Release/plugins/LocalGames -p:Configuration=Release

  cd ../SteamExporterPlugin
  dotnet publish -o ../Release/plugins/SteamExporterPlugin -p:Configuration=Release

  cd ../BottlesPlugin
  dotnet publish -o ../Release/plugins/BottlesPlugin -p:Configuration=Release

  cd ../ItchIoIntegration
  dotnet publish -o ../Release/plugins/ItchIoIntegration -p:Configuration=Release

  cd ../SteamGridDbMiddleware
  dotnet publish -o ../Release/plugins/SteamGridDbMiddleware -p:Configuration=Release

  cd ../HideGamesMiddleware
  dotnet publish -o ../Release/plugins/HideGamesMiddleware -p:Configuration=Release

  cd ../LegendaryIntegration
  dotnet publish -o ../Release/plugins/LegendaryIntegration -p:Configuration=Release

  cd ../GogIntegration
  dotnet publish -o ../Release/plugins/GogIntegration -p:Configuration=Release

  cd ../Launcher
  dotnet publish -o ../Release -r linux-x64 --self-contained -p:PublishSingleFile=true -p:Configuration=Release

  cd ../Release
  ln -fs /usr/bin/legendary
  ln -fs /usr/bin/gogdl
}

package() {
# Create directories
  mkdir -p "$pkgdir/opt/Alfae" "$pkgdir/usr/bin"
# Install
  mv Alfae/Release/* "$pkgdir/opt/Alfae"
  ln -s /opt/Alfae/Alfae "$pkgdir/usr/bin/alfae"
  install -Dm644 Alfae/Launcher/Assets/icon.png "$pkgdir/usr/share/icons/hicolor/512x512/apps/alfae.png"
  install -Dm644 alfae.desktop -t "$pkgdir/usr/share/applications"
}