diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -2,22 +2,21 @@ # Based on the PKGBUILD for gdlauncher. pkgname="gdlauncher-beta" _pkgname="gdlauncher" -pkgver="1.1.15.beta.3" -_pkgver="1.1.15-beta.3" +pkgver="1.1.15.beta.4" +_pkgver="1.1.15-beta.4" pkgrel=1 arch=('x86_64') pkgdesc="GDLauncher is simple, yet powerful Minecraft custom launcher with a strong focus on the user experience" url="https://gdevs.io" license=('GPL3') -makedepends=('gendesk' 'git' 'nodejs' 'npm' 'rust' 'imagemagick') +makedepends=('gendesk' 'nodejs' 'npm' 'rust') depends=('libnotify' 'libxss' 'libxtst' 'libindicator-gtk3' 'libappindicator-gtk3' 'electron' 'p7zip') conflicts=('gdlauncher' 'gdlauncher-beta-bin' 'gdlauncher-appimage' 'gdlauncher-git' 'gdlauncher-bin' 'gdlauncher-appimage') provides=('gdlauncher') source=("https://github.com/gorilla-devs/GDLauncher/archive/refs/tags/v${_pkgver}.tar.gz" "use-system-7za-and-disable-updater.patch") -md5sums=('0d8ff9bdcd1cc5df2be4962adfaa71cf' - '82fbdbfac2a7c41d1209734e1f5633b7') -icon_sizes=(48 128 256 1024) +md5sums=('76c87c38980d6856f8a89795283154be' + 'c72fed43c676c710c8cfa3397270a977') prepare() { # Generate .desktop @@ -31,14 +30,16 @@ prepare() { -e 's$public/electron.js$build/electron.js$' \ -e '/"dependencies"/i\ "bundledDependencies": ["7zip-bin"],' patch -p1 -i "${srcdir}/use-system-7za-and-disable-updater.patch" - mkdir .git # Husky needs a .git folder to not die + + # Create .git folder to stop Husky from crashing + mkdir -p .git } build() { cd "${srcdir}/GDLauncher-${_pkgver}/" # Install required npm packages - npm install --cache="${srcdir}"/npm-cache + npm install --cache="${srcdir}/npm-cache" # Build the program export CI=false \ @@ -46,7 +47,7 @@ build() { NODE_ENV=production \ REACT_APP_RELEASE_TYPE=setup npx craco build - npx webpack --config scripts/electronWebpackConfig.js + npx webpack --config ./scripts/electronWebpackConfig.js } package() { @@ -57,7 +58,7 @@ package() { # Create run script install -d -m755 "${pkgdir}/usr/bin/" - printf '#!/bin/sh\nexec electron /usr/lib/gdlauncher "$@"' > "${pkgdir}/usr/bin/gdlauncher" + printf '#!/bin/sh\ncd /usr/lib/gdlauncher/\nexec electron . "$@"' > "${pkgdir}/usr/bin/gdlauncher" chmod a+x "${pkgdir}/usr/bin/gdlauncher" # Desktop entry @@ -65,8 +66,9 @@ package() { install -D -m644 "${srcdir}/GDLauncher.desktop" "${pkgdir}/usr/share/applications/GDLauncher.desktop" # Install icons - for size in "${icon_sizes[@]}"; do - install -d -m755 "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/" - convert "${srcdir}/GDLauncher-${_pkgver}/public/icon.png" -resize "${size}x${size}" "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${_pkgname}.png" + cd "${srcdir}/GDLauncher-${_pkgver}/public/linux-icons/" + for icon in *.png; do + install -d -m755 "${pkgdir}/usr/share/icons/hicolor/${icon::-4}/apps/" + cp "$icon" "${pkgdir}/usr/share/icons/hicolor/${icon::-4}/apps/${_pkgname}.png" done } |