From a0d224d81f56f89a4c785989546a54f8a62c3703 Mon Sep 17 00:00:00 2001 From: Puqns67 Date: Mon, 17 Jun 2024 13:41:36 +0800 Subject: [PATCH] osu-bin/2024.521.2-3: also install icons to hicolor theme --- packages/osu-bin/.SRCINFO | 4 +++- packages/osu-bin/PKGBUILD | 24 +++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/packages/osu-bin/.SRCINFO b/packages/osu-bin/.SRCINFO index 6b1f9a1..79727e6 100644 --- a/packages/osu-bin/.SRCINFO +++ b/packages/osu-bin/.SRCINFO @@ -1,15 +1,17 @@ pkgbase = osu-bin pkgdesc = A free-to-win rhythm game. Rhythm is just a click away! pkgver = 2024.521.2 - pkgrel = 2 + pkgrel = 3 url = https://osu.ppy.sh/ arch = x86_64 license = MIT license = CC-BY-NC-4.0 + makedepends = imagemagick depends = bash depends = ffmpeg4.4 depends = gcc-libs depends = glibc + depends = hicolor-icon-theme depends = lttng-ust2.12 depends = zlib provides = osu diff --git a/packages/osu-bin/PKGBUILD b/packages/osu-bin/PKGBUILD index 7ed46b9..a39fc2a 100644 --- a/packages/osu-bin/PKGBUILD +++ b/packages/osu-bin/PKGBUILD @@ -8,18 +8,21 @@ # This PKGBUILD is base on the AUR repo osu-lazer-bin, from these contributors above _appname='osu' -_appver=2024.521.2 +_appver='2024.521.2' _resname='osu-resources' -_resver=2024.517.0 +_resver='2024.517.0' + +_icon=('16x16' '24x24' '32x32' '48x48' '64x64' '128x128' '256x256' '512x512') pkgname="${_appname}-bin" pkgver="${_appver}" -pkgrel=2 +pkgrel=3 pkgdesc="A free-to-win rhythm game. Rhythm is just a click away!" arch=('x86_64') url='https://osu.ppy.sh/' license=('MIT' 'CC-BY-NC-4.0') -depends=('bash' 'ffmpeg4.4' 'gcc-libs' 'glibc' 'lttng-ust2.12' 'zlib') +depends=('bash' 'ffmpeg4.4' 'gcc-libs' 'glibc' 'hicolor-icon-theme' 'lttng-ust2.12' 'zlib') +makedepends=('imagemagick') provides=("${_appname}" 'osu-lazer') conflicts=("${_appname}" 'osu-lazer') replaces=('osu-lazer') @@ -49,6 +52,12 @@ prepare() { # Remove pdb files rm -v *.pdb + + # Downscale icons + mkdir "${srcdir}/icons" + for size in ${_icon[@]}; do + magick -verbose "${srcdir}/squashfs-root/osu!.png" -resize "${size}!" "${srcdir}/icons/${size}.png" + done } package() { @@ -60,10 +69,15 @@ package() { install -Dm755 "${srcdir}/${_appname}.bash" "${pkgdir}/usr/bin/${_appname}" # Install license file - install -Dm644 "${srcdir}/${_resname}-LICENCE-${_resver}.md" "${pkgdir}/usr/share/licenses/${pkgname}/${_resname}-LICENCE-${_resver}.md" + install -Dm644 "${srcdir}/${_resname}-LICENCE-${_resver}.md" "${pkgdir}/usr/share/licenses/${pkgname}/${_resname}-LICENCE.md" # Install icon, desktop and mime files install -Dm644 "${srcdir}/squashfs-root/osu!.png" "${pkgdir}/usr/share/pixmaps/${_appname}.png" install -Dm644 "${srcdir}/${_appname}.desktop" "${pkgdir}/usr/share/applications/${_appname}.desktop" install -Dm644 "${srcdir}/${_appname}.xml" "${pkgdir}/usr/share/mime/packages/${_appname}.xml" + + # Install downscaled icons + for size in ${_icon[@]}; do + install -Dm644 "${srcdir}/icons/${size}.png" "${pkgdir}/usr/share/icons/hicolor/${size}/apps/${_appname}.png" + done }