summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 491eb5ecf721b304872443e366716e7cc26b1e32 (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
# Contributor: morguldir <morguldir@protonmail.com>
# Contributor: xstraok <maximkorotkov4@gmail.com>
# Contributor: DrakeTDL <everyone@disroot.org>
# Based on https://aur.archlinux.org/packages/an-anime-game-launcher-git
pkgname="anime-games-launcher-git"
_pkgname="${pkgname%-git}"
pkgver=1.0.0.r3.g762e822
pkgrel=1
pkgdesc="Universal linux launcher for anime games"
arch=("x86_64")
url="https://github.com/an-anime-team/anime-games-launcher"
license=("GPL3")
depends=(
  git
  p7zip
  glibc
  gtk4
  libadwaita
  xdelta3
)
makedepends=(rust)
optdepends=(
  "mangohud: FPS Hud/GUI"
  "gamemode: Game Optimizations"
  "gamescope: a tool from Valve that allows for games to run in an isolated Xwayland instance"
)
source=(
  "git+https://github.com/an-anime-team/anime-games-launcher"
  "${_pkgname}.desktop"
)
noextract=()
md5sums=('SKIP'
         '654ba383b74455d04c96d88ad40013ee')

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


build() {
  cd "${_pkgname}"
  cargo build --release
}

package() {
  cd "${_pkgname}"

  install -dm755 "${pkgdir}/usr/lib/${pkgname}"
  install -dm755 "${pkgdir}/usr/bin/"

  cp target/release/anime-games-launcher "${pkgdir}/usr/lib/${pkgname}/${_pkgname}"
  ln -s "/usr/lib/${pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"

  install -Dm644 "assets/images/icon.png" "${pkgdir}/usr/share/pixmaps/anime-games-launcher.png"
  install -Dm644 "assets/images/icon.png" "${pkgdir}/usr/share/icons/moe.launcher.anime-games-launcher.png"
  install -Dm644 "${srcdir}/anime-games-launcher.desktop" -t "${pkgdir}/usr/share/applications"
}