summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d8b8465b8cc456e861b3b944843dc7499125e599 (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
# Maintainer: anispwyn <anisphia_wynn_palettia@proton.me>
pkgname="sleepy-launcher-git"
_pkgname="${pkgname%-git}"
pkgver=1.0.0.r5.g9ac9f44
pkgrel=1
pkgdesc="Sleepy game launcher for Linux with telemetry disabling"
arch=("x86_64")
url="https://github.com/an-anime-team/sleepy-launcher"
license=("GPL3")
depends=(
  "git"
  "p7zip"
  "glibc"
  "gtk4"
  "libadwaita"
  "gstreamer"
)
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/sleepy-launcher"
  "sleepy-launcher.desktop"
)
noextract=()
md5sums=('SKIP' 'SKIP')

pkgver() {
  cd "$srcdir/${_pkgname}"
  git fetch --tags
  # Fallback in case there are no tags
  if ! git describe --long --tags &>/dev/null; then
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  else
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  fi
}


prepare() {
  cd "$srcdir/${_pkgname}"
  git checkout next 
  git submodule update --init --recursive --single-branch
  git pull

}


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

package() {
  cd "$srcdir/${_pkgname}"

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

  cp target/release/sleepy-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/sleepy-launcher.png"
  install -Dm644 "assets/images/icon.png" "${pkgdir}/usr/share/icons/moe.launcher.sleepy-launcher.png"
  install -Dm644 "${srcdir}/sleepy-launcher.desktop" -t "${pkgdir}/usr/share/applications"
}