# Maintainer: Doxxed By-MlgmXyysd # Contributor: Maxim Korotkov pkgname=the-honkers-railway-launcher-git _pkgname="${pkgname%-git}" pkgver=1.5.2.r2.g44ff7d2 pkgrel=1 pkgdesc="A launcher for a specific anime game with auto-patching, discord rpc and time tracking" url="https://github.com/an-anime-team/the-honkers-railway-launcher" provides=("the-honkers-railway-launcher") conflicts=("the-honkers-railway-launcher-bin") arch=("amd64") license=("GPL3") pkgver(){ cd "$_pkgname" git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } depends=( "libadwaita-1-0" "tar" "unzip" "xdg-desktop-portal" "xdelta3" "cabextract" "git" "iputils-ping" "libgtk-4-common" ) makedepends=( "cargo" "python3" "python3-gi" "libadwaita-1-dev" "libssl-dev" ) optdepends=( "mangohud: FPS Hud/GUI" "gamemode: Game Optimizations" "gamescope: A tool from Valve that allows for games to run in an isolated Xwayland instance" # Debian do not has this package, but mangoapp references it ) source=( #"git+https://github.com/an-anime-team/the-honkers-railway-launcher" "https://raw.githubusercontent.com/an-anime-team/the-honkers-railway-launcher/main/assets/images/icon.png" # To make MPR satisfied "the-honkers-railway-launcher.desktop" ) md5sums=( #SKIP '3a9757edaaa59d9696ffc1ffacdafb30' '3817083b3f90f0ec4e5290a914dcaa9b' ) # Makedeb has a different behavior with Arch's makepkg, which would prevent the switch of remote forks. # Actually it clones the repo and create a totally unchanged except .git but local one in src. prepare() { # We need to clone it in prepare(), not in source. rm -rf $_pkgname git clone $url cd $_pkgname git switch next git pull git submodule update --init --recursive --single-branch } build() { cd $_pkgname cargo build --release } package() { cd $_pkgname install -dm755 "${pkgdir}/usr/lib/${pkgname}" install -dm755 "${pkgdir}/usr/bin/" cp target/release/honkers-railway-launcher "${pkgdir}/usr/lib/${pkgname}/the-honkers-railway-launcher" install -Dm644 "${srcdir}/icon.png" "${pkgdir}/usr/share/pixmaps/the-honkers-railway-launcher.png" ln -s "/usr/lib/${pkgname}/the-honkers-railway-launcher" "${pkgdir}/usr/bin/the-honkers-railway-launcher" install -Dm644 "${srcdir}/the-honkers-railway-launcher.desktop" -t "${pkgdir}/usr/share/applications" install -Dm644 "${srcdir}/icon.png" "${pkgdir}/usr/share/icons/moe.launcher.the-honkers-railway-launcher.png" }