diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..50ecbdc --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2026 Marcel Noufal + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/packaging/arch/0001-fix-display-correct-icon-under-wayland-kde.patch b/packaging/arch/0001-fix-display-correct-icon-under-wayland-kde.patch new file mode 100644 index 0000000..8381ff7 --- /dev/null +++ b/packaging/arch/0001-fix-display-correct-icon-under-wayland-kde.patch @@ -0,0 +1,25 @@ +From e6fdcd3e790edd8ca7d5727d210f7f79fa81f7e0 Mon Sep 17 00:00:00 2001 +From: Nycz-lab +Date: Thu, 7 May 2026 12:59:27 +0200 +Subject: [PATCH] fix: display correct icon under wayland kde + +--- + src/main/index.ts | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/main/index.ts b/src/main/index.ts +index acea5be..fc65f1b 100644 +--- a/src/main/index.ts ++++ b/src/main/index.ts +@@ -91,6 +91,8 @@ function createWindow(): void { + void window.loadFile(join(__dirname, '../renderer/index.html')) + } + } ++app.setName('mongobench'); ++app.setDesktopName?.('mongobench'); + + app.whenReady().then(() => { + const secrets = new SecretsStore() +-- +2.54.0 + diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD new file mode 100644 index 0000000..75e4704 --- /dev/null +++ b/packaging/arch/PKGBUILD @@ -0,0 +1,74 @@ +pkgname=mongobench-git +_appname=mongobench +pkgver=.r22.ged97c89 +pkgrel=1 +pkgdesc="A modern, dark-mode-first MongoDB GUI" +arch=('x86_64') +url="https://github.com/ByteExceptionM/MongoBench" +license=('MIT') +depends=('electron') +makedepends=('npm') +provides=("$_appname") +conflicts=("$_appname") +source=( + "git+https://github.com/ByteExceptionM/MongoBench.git" + "0001-fix-display-correct-icon-under-wayland-kde.patch" +) +sha256sums=( + 'SKIP' + 'SKIP' +) + +pkgver() { + cd "$srcdir/MongoBench" + printf '%s.r%s.g%s' \ + "$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo 0.1.0)" \ + "$(git rev-list --count HEAD)" \ + "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/MongoBench" + for p in "$srcdir"/*.patch; do + patch -Np1 -i "$p" + done +} + +build() { + cd "$srcdir/MongoBench" + npm ci + npm run build + npm prune --omit=dev +} + +package() { + cd "$srcdir/MongoBench" + + install -dm755 "$pkgdir/usr/lib/$_appname" + cp -r out "$pkgdir/usr/lib/$_appname/" + cp -r node_modules "$pkgdir/usr/lib/$_appname/" + install -Dm644 package.json "$pkgdir/usr/lib/$_appname/package.json" + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + install -Dm755 /dev/stdin "$pkgdir/usr/bin/$_appname" <<'EOF' +#!/bin/sh +exec electron /usr/lib/mongobench "$@" +EOF + + install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/$_appname.desktop" <<'EOF' +[Desktop Entry] +Type=Application +Name=MongoBench +GenericName=MongoDB GUI +Comment=A modern, dark-mode-first MongoDB GUI +Exec=mongobench %U +Icon=mongobench +Terminal=false +Categories=Development;Database; +StartupWMClass=MongoBench +EOF + + install -Dm644 build/icon.png \ + "$pkgdir/usr/share/icons/hicolor/512x512/apps/$_appname.png" +}