Last active
August 9, 2022 01:40
-
-
Save CorySanin/9fd6f042386b16154a97edb272c5387c to your computer and use it in GitHub Desktop.
OpenRCT2 Dev Appimage PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgbase = openrct2-dev-appimage | |
pkgdesc = https://nightly.link/OpenRCT2/OpenRCT2/workflows/ci/develop/OpenRCT2-AppImage.zip | |
pkgver = 0.4.1 | |
pkgrel = 1 | |
url = https://openrct2.io | |
arch = x86_64 | |
license = GPL3 | |
provides = openrct2-dev | |
conflicts = openrct2-dev | |
options = !strip | |
source = appimage.zip::https://nightly.link/OpenRCT2/OpenRCT2/workflows/ci/develop/OpenRCT2-AppImage.zip | |
sha256sums = SKIP | |
pkgname = openrct2-dev-appimage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf pkg/ src/ *.zip *.tar.zst | |
makepkg -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Cory Sanin <corysanin@outlook.com> | |
_basename="openrct2" | |
_pkgname="$_basename-dev" | |
pkgname=${_pkgname}-appimage | |
pkgdesc="https://nightly.link/OpenRCT2/OpenRCT2/workflows/ci/develop/OpenRCT2-AppImage.zip" | |
pkgver=0.4.1 | |
pkgrel=1 | |
provides=("$_pkgname") | |
conflicts=("$_pkgname") | |
url="https://openrct2.io" | |
arch=("x86_64") | |
license=("GPL3") | |
_appimage="$_pkgname.AppImage" | |
_zip="appimage" | |
source=("$_zip.zip"::"https://nightly.link/OpenRCT2/OpenRCT2/workflows/ci/develop/OpenRCT2-AppImage.zip") | |
sha256sums=('SKIP') | |
options=(!strip) | |
prepare() { | |
mv "$srcdir/OpenRCT2-x86_64.AppImage" "$srcdir/$_appimage" | |
chmod +x "$srcdir/$_appimage" | |
"./$_appimage" --appimage-extract | |
# Append dev to name in desktop file | |
sed -i -E "s:openrct2:openrct2-dev:" "${srcdir}/squashfs-root/${_basename}.desktop" | |
sed -i -E "s:OpenRCT2:OpenRCT2 Dev:" "${srcdir}/squashfs-root/${_basename}.desktop" | |
# Update icon filenames | |
for f in ${srcdir}/squashfs-root/usr/share/icons/hicolor/*/apps/*.*; do mv "$f" "$(echo "$f" | sed s:/openrct2\\.:/openrct2-dev.:)"; done | |
} | |
package() { | |
# Appimage and symlink | |
install -Dpm755 "${_appimage}" "${pkgdir}/opt/${_pkgname}/${_appimage}" | |
install -dm755 "${pkgdir}/usr/bin" | |
ln -s "/opt/${_pkgname}/${_appimage}" "${pkgdir}/usr/bin/${_pkgname}" | |
# Desktop file | |
install -Dm644 "${srcdir}/squashfs-root/${_basename}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop" | |
# Icons | |
install -dm755 "${pkgdir}/usr/share/" | |
cp -r --no-preserve=mode,ownership "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment