summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Herbrich2022-02-03 21:58:34 +0100
committerDennis Herbrich2022-02-03 21:58:34 +0100
commit3ffed4f5c8088790d2ba2392c502fff8830e5770 (patch)
tree9fe26f1441412d89a69bf96da549b60aae9d52f1
parentb466bc76b39be14a6c3321d8f1ce9dfe2db9d5f1 (diff)
downloadaur-3ffed4f5c8088790d2ba2392c502fff8830e5770.tar.gz
upgpkg: sunvox 2.0c-2: desktop file, icons, and mime types; cleanup
- set new maintainer in PKGBUILD comment - add static desktop file, remove generation in prepare() - add mime type definitions for .sunsynth and .sunvox - extract and package icons from Windows executable - switch to SHA256 checksums - fix permission issue with a packaged example project - depends: - chg: sdl -> sdl2; fix wrong dependency - add: hicolor-icon-theme; default icon directory structure - del: glibc, gcc-libs; not declaring 'base' group packages - del: gendesk; desktop file supplied, not generated - makedepends: - add: icoutils; extract and convert icons from upstream .exe - optdepends: - add: jack; for JACK audio driver support
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD66
-rw-r--r--sunvox.desktop12
-rw-r--r--sunvox.xml17
4 files changed, 84 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 79626ccab9f6..b6dd805fe0bc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,26 @@
pkgbase = sunvox
pkgdesc = Small, fast and powerful modular synthesizer with pattern-based sequencer (tracker).
pkgver = 2.0c
- pkgrel = 1
+ pkgrel = 2
url = http://warmplace.ru/soft/sunvox/
arch = i686
arch = x86_64
license = custom
makedepends = unzip
- depends = libx11
- depends = glibc
- depends = gcc-libs
+ makedepends = icoutils
depends = alsa-lib
- depends = sdl
+ depends = hicolor-icon-theme
+ depends = libx11
depends = libxcb
depends = libxau
depends = libxdmcp
- depends = gendesk
+ depends = sdl2
+ optdepends = jack: jack audio server output
source = http://warmplace.ru/soft/sunvox/sunvox-2.0c.zip
- md5sums = 318d70fc52496f03fdd1b8db999072f3
+ source = sunvox.desktop
+ source = sunvox.xml
+ sha256sums = 949e5348da9faa92ce17aac943b58027bdb797b65c7f5f365ef0610bb6dd8a3d
+ sha256sums = 21680b38c66e4375f0a01e496d3167fe8695ada60204c885ff63e63022b63495
+ sha256sums = 7ac2192298abdda802832518c98721b08881e32e8b470f2989c614852dd44f67
pkgname = sunvox
diff --git a/PKGBUILD b/PKGBUILD
index 76756b4d1991..0dd248d674ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,58 @@
# Submitter: Anton Yermalovich <zuzu@bk.ru>
-# Maintainer: Yousef Amar <yousef@amar.io>
+# Maintainer: Dennis Herbrich <dennis.herbrich@veloxis.de>
+# Contributor: Yousef Amar <yousef@amar.io>
# Contributor: zwergnase <zwergnase@posteo.de>
pkgname=sunvox
pkgver=2.0c
-pkgrel=1
+pkgrel=2
pkgdesc="Small, fast and powerful modular synthesizer with pattern-based sequencer (tracker)."
arch=('i686' 'x86_64')
url="http://warmplace.ru/soft/sunvox/"
license=(custom)
groups=()
-depends=(
- 'libx11'
- 'glibc'
- 'gcc-libs'
- 'alsa-lib'
- 'sdl'
- 'libxcb'
- 'libxau'
- 'libxdmcp'
- 'gendesk'
-)
-makedepends=('unzip')
-source=(http://warmplace.ru/soft/sunvox/$pkgname-$pkgver.zip)
-md5sums=('318d70fc52496f03fdd1b8db999072f3')
+depends=('alsa-lib'
+ 'hicolor-icon-theme'
+ 'libx11'
+ 'libxcb'
+ 'libxau'
+ 'libxdmcp'
+ 'sdl2')
+makedepends=('unzip' 'icoutils')
+optdepends=('jack: jack audio server output')
+source=(http://warmplace.ru/soft/sunvox/$pkgname-$pkgver.zip sunvox.desktop sunvox.xml)
+sha256sums=('949e5348da9faa92ce17aac943b58027bdb797b65c7f5f365ef0610bb6dd8a3d'
+ '21680b38c66e4375f0a01e496d3167fe8695ada60204c885ff63e63022b63495'
+ '7ac2192298abdda802832518c98721b08881e32e8b470f2989c614852dd44f67')
-prepare() {
- gendesk --pkgname "$pkgname" --pkgdesc "$pkgdesc"
+build() {
+ # extract and convert all application icon sizes
+ printf -- ":: extracting application icons from executable: %s\n" "${srcdir}/sunvox/sunvox/windows_x86_64/sunvox.exe"
+ wrestool --extract --type=14 --output /dev/stdout "${srcdir}/sunvox/sunvox/windows_x86_64/sunvox.exe" | \
+ icotool --icon -l /dev/stdin | \
+ while IFS= read -r _icotool_args; do
+ _icon_dimensions=$(echo $_icotool_args | sed -n 's/.*--width=\([0-9]\+\)\s\+.*--height=\([0-9]\+\)\s\+.*/\1x\2/p')
+ if [[ -n $_icon_dimensions ]]; then
+ mkdir -p "${srcdir}/icons/hicolor/${_icon_dimensions}/"{apps,mimetypes}
+ wrestool --extract --type=14 --output /dev/stdout "sunvox/sunvox/windows_x86_64/sunvox.exe" | \
+ icotool --extract $_icotool_args --output "${srcdir}/icons/hicolor/${_icon_dimensions}/apps/sunvox.png" /dev/stdin
+ printf -- "'%s' extracted!\n" "${srcdir}/icons/hicolor/${_icon_dimensions}/apps/sunvox.png"
+ cp -v "${srcdir}/icons/hicolor/${_icon_dimensions}/apps/sunvox.png" "${srcdir}/icons/hicolor/${_icon_dimensions}/mimetypes/application-x-sunvox-project.png"
+ cp -v "${srcdir}/icons/hicolor/${_icon_dimensions}/apps/sunvox.png" "${srcdir}/icons/hicolor/${_icon_dimensions}/mimetypes/application-x-sunvox-instrument.png"
+ else
+ printf -- "error: could not extract icon dimensions\n" >&2
+ exit 2
+ fi
+ done
}
package() {
install -dm755 "${pkgdir}/opt/${pkgname}"
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
- install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
+ install -dm755 "${pkgdir}/usr/share/icons/hicolor"
+ install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -Dm644 "${pkgname}.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}.xml"
+ cp -a "${srcdir}"/icons/hicolor/* "${pkgdir}/usr/share/icons/hicolor/"
if [ "$CARCH" = "x86_64" ]; then
install -Dm755 "${srcdir}/sunvox/sunvox/linux_x86_64/sunvox" "${pkgdir}/usr/bin/sunvox"
@@ -42,8 +62,10 @@ package() {
install -Dm755 "${srcdir}/sunvox/sunvox/linux_x86/sunvox_no_simd" "${pkgdir}/usr/bin/sunvox_no_simd"
fi
- cp -a "${srcdir}/sunvox/examples" "${pkgdir}/opt/${pkgname}/examples"
- cp -a "${srcdir}/sunvox/instruments" "${pkgdir}/opt/${pkgname}/instruments"
- cp -a "${srcdir}/sunvox/effects" "${pkgdir}/opt/${pkgname}/effects"
+ cp -a "${srcdir}"/sunvox/{examples,instruments,effects} "${pkgdir}/opt/${pkgname}/"
+ # enforce correct and consistent permissions
+ chmod -R 0644 "${pkgdir}/opt/${pkgname}"/* "${pkgdir}"/usr/share/icons/hicolor/*
+ find "${pkgdir}/opt/${pkgname}" "${pkgdir}"/usr/share/icons/hicolor -type d -print0 | xargs -0 chmod 0755
+
install -Dm644 "${srcdir}/sunvox/docs/license/sunvox.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/sunvox.desktop b/sunvox.desktop
new file mode 100644
index 000000000000..a5c562c11c45
--- /dev/null
+++ b/sunvox.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Sunvox
+GenericName=Modular Synthesizer / Tracker
+Comment=Small, fast and powerful modular synthesizer with pattern-based sequencer (tracker).
+Exec=sunvox %f
+Icon=sunvox
+Terminal=false
+StartupNotify=false
+MimeType=application/x-sunvox-project;application/x-sunvox-instrument;
+Categories=Audio;AudioVideo;Music;Sequencer;
diff --git a/sunvox.xml b/sunvox.xml
new file mode 100644
index 000000000000..eb12e1664017
--- /dev/null
+++ b/sunvox.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/x-sunvox-project">
+ <comment>Sunvox project file</comment>
+ <magic>
+ <match type="string" offset="0" value="SVOX\0\0\0VERS\t"/>
+ </magic>
+ <glob pattern="*.sunvox"/>
+ </mime-type>
+ <mime-type type="application/x-sunvox-instrument">
+ <comment>Sunvox instrument module</comment>
+ <magic>
+ <match type="string" offset="0" value="SSYN\0\0\0VERS\t"/>
+ </magic>
+ <glob pattern="*.sunsynth"/>
+ </mime-type>
+</mime-info>