summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO27
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD71
-rw-r--r--configure-environment.diff24
-rw-r--r--electron-builder-config.diff74
-rw-r--r--fix-argv.diff13
7 files changed, 231 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5c99797e4428
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = beekeeper-studio
+ pkgdesc = Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more
+ pkgver = 3.7.10
+ pkgrel = 1
+ url = https://github.com/beekeeper-studio/beekeeper-studio
+ arch = x86_64
+ arch = i686
+ arch = armv7h
+ arch = aarch64
+ license = GPL3
+ makedepends = git
+ makedepends = libxcrypt-compat
+ makedepends = nodejs<19.0.0
+ makedepends = npm
+ makedepends = python
+ makedepends = yarn
+ depends = electron13
+ source = beekeeper-studio-3.7.10-1.tar.gz::https://github.com/beekeeper-studio/beekeeper-studio/archive/v3.7.10.tar.gz
+ source = electron-builder-config.diff
+ source = configure-environment.diff
+ source = fix-argv.diff
+ sha512sums = dd699e618a00cb7851d6366c8a6d818e1ff78c2ec6f7b319041053b665d7c0d0c5bb37d55887fe7f8757294f30d00651e3c540e1f5342094ac98df7d1e0d3117
+ sha512sums = c8c63ffdc75ec73f6258aa0020b228f86d883de0c6608b14b3a35604dfeaebac7ae89f0dbc57b3bbb922cbfc3231117d769488f194961c68af646574d9ea49e0
+ sha512sums = dc653535664904c74c812b589881994c1109c664f9174186ccd362a42172edeb0251712c98f3c9a17d7356bf47f942eff03c2294181402ff9cbc9cb211616d57
+ sha512sums = ae6b5847bdf65f8fb43b3694c151f55c307b2b402624b627b755133b4173760fa4673158b77c252b8a9b18dc33be3068e2c79e23762a4de05de11447cf259c3c
+
+pkgname = beekeeper-studio
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..a467ee9a97a6
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+tab_width = 4
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..82b3c183d5d4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+# from https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+*.tar
+*.tar.*
+*.rpm
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+*/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..398914cdec04
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Daniel Peukert <daniel@peukert.cc>
+pkgname='beekeeper-studio'
+pkgver='3.7.10'
+pkgrel='1'
+pkgdesc='Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more'
+arch=('x86_64' 'i686' 'armv7h' 'aarch64')
+url="https://github.com/$pkgname/$pkgname"
+license=('GPL3')
+_electronpkg='electron13'
+depends=("$_electronpkg")
+makedepends=('git' 'libxcrypt-compat' 'nodejs<19.0.0' 'npm' 'python' 'yarn')
+source=(
+ "$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz"
+ 'electron-builder-config.diff'
+ 'configure-environment.diff'
+ 'fix-argv.diff'
+)
+sha512sums=('dd699e618a00cb7851d6366c8a6d818e1ff78c2ec6f7b319041053b665d7c0d0c5bb37d55887fe7f8757294f30d00651e3c540e1f5342094ac98df7d1e0d3117'
+ 'c8c63ffdc75ec73f6258aa0020b228f86d883de0c6608b14b3a35604dfeaebac7ae89f0dbc57b3bbb922cbfc3231117d769488f194961c68af646574d9ea49e0'
+ 'dc653535664904c74c812b589881994c1109c664f9174186ccd362a42172edeb0251712c98f3c9a17d7356bf47f942eff03c2294181402ff9cbc9cb211616d57'
+ 'ae6b5847bdf65f8fb43b3694c151f55c307b2b402624b627b755133b4173760fa4673158b77c252b8a9b18dc33be3068e2c79e23762a4de05de11447cf259c3c')
+
+_sourcedirectory="$pkgname-$pkgver"
+
+
+prepare() {
+ cd "$srcdir/$_sourcedirectory/"
+
+ patch --forward -p1 < "$srcdir/electron-builder-config.diff"
+ patch --forward -p1 < "$srcdir/configure-environment.diff"
+ patch --forward -p1 < "$srcdir/fix-argv.diff"
+
+ sed -i "s|%%ELECTRON_DIST%%|/usr/lib/$_electronpkg|g" 'apps/studio/vue.config.js'
+ sed -i "s|%%ELECTRON_VERSION%%|$(cat "/usr/lib/$_electronpkg/version")|g" 'apps/studio/vue.config.js'
+
+ yarn install --ignore-engines
+}
+
+build() {
+ cd "$srcdir/$_sourcedirectory/apps/studio/"
+ NODE_OPTIONS='--openssl-legacy-provider' yarn run vue-cli-service electron:build
+}
+
+package() {
+ # Electron resources
+ cd "$srcdir/$_sourcedirectory/apps/studio/dist_electron/"
+ install -Dm644 'linux-unpacked/resources/app.asar' "$pkgdir/usr/lib/$pkgname/app.asar"
+ cp -r --no-preserve=ownership --preserve=mode 'linux-unpacked/resources/app.asar.unpacked/' "$pkgdir/usr/lib/$pkgname/app.asar.unpacked/"
+ cp -r --no-preserve=ownership --preserve=mode 'linux-unpacked/resources/public/' "$pkgdir/usr/lib/$pkgname/public/"
+
+ # Binary
+ install -dm755 "$pkgdir/usr/bin/"
+ cat << EOF > "$pkgdir/usr/bin/$pkgname"
+#!/bin/sh
+exec $_electronpkg '/usr/lib/$pkgname/app.asar' "\$@"
+EOF
+ chmod +x "$pkgdir/usr/bin/$pkgname"
+
+ # Extract pacman archive and copy files
+ mkdir -p "$srcdir/$pkgname-$pkgver-$pkgrel-pacman/"
+ tar -xf "$pkgname-$pkgver.pacman" --directory "$srcdir/$pkgname-$pkgver-$pkgrel-pacman/"
+ cd "$srcdir/$pkgname-$pkgver-$pkgrel-pacman/"
+
+ install -dm755 "$pkgdir/usr/share/"
+ cp -r --no-preserve=ownership --preserve=mode 'usr/share/applications' "$pkgdir/usr/share/applications/"
+ cp -r --no-preserve=ownership --preserve=mode 'usr/share/icons' "$pkgdir/usr/share/icons/"
+ cp -r --no-preserve=ownership --preserve=mode 'usr/share/mime' "$pkgdir/usr/share/mime/"
+
+ # Get rid of binary path in desktop file
+ sed "s|^Exec=\"/opt/Beekeeper Studio/$pkgname\"|Exec=$pkgname|" -i "$pkgdir/usr/share/applications/$pkgname.desktop"
+}
diff --git a/configure-environment.diff b/configure-environment.diff
new file mode 100644
index 000000000000..99b4f4a61025
--- /dev/null
+++ b/configure-environment.diff
@@ -0,0 +1,24 @@
+diff --git a/apps/studio/src/common/platform_info.ts b/apps/studio/src/common/platform_info.ts
+index e18d7c4f..3fe4b259 100644
+--- a/apps/studio/src/common/platform_info.ts
++++ b/apps/studio/src/common/platform_info.ts
+@@ -4,8 +4,8 @@ import * as electron from 'electron'
+ const e = electron.remote ? electron.remote : electron
+ const p = electron.remote ? electron.remote.process : process
+ const platform = p.env.OS_OVERRIDE ? p.env.OS_OVERRIDE : p.platform
+-const testMode = p.env.TEST_MODE ? true : false
+-const isDevEnv = !(e.app && e.app.isPackaged);
++const testMode = false;
++const isDevEnv = false;
+ const isWindows = platform === 'win32'
+ const isMac = platform === 'darwin'
+ const easyPlatform = isWindows ? 'windows' : (isMac ? 'mac' : 'linux')
+@@ -13,7 +13,7 @@ let windowPrefersDarkMode = false
+ if (electron.remote) {
+ windowPrefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
+ }
+-const updatesDisabled = !!p.env.BEEKEEPER_DISABLE_UPDATES
++const updatesDisabled = true;
+
+ let userDirectory = testMode ? './tmp' : e.app.getPath("userData")
+ const downloadsDirectory = testMode ? './tmp' : e.app.getPath('downloads')
diff --git a/electron-builder-config.diff b/electron-builder-config.diff
new file mode 100644
index 000000000000..d3ec74f52533
--- /dev/null
+++ b/electron-builder-config.diff
@@ -0,0 +1,74 @@
+diff --git a/apps/studio/vue.config.js b/apps/studio/vue.config.js
+index f9d45c7b..974f2707 100644
+--- a/apps/studio/vue.config.js
++++ b/apps/studio/vue.config.js
+@@ -49,6 +49,8 @@ module.exports = {
+ files: ['**/*', 'public/icons/**/*'],
+ afterSign: "electron-builder-notarize",
+ afterPack: "./build/afterPack.js",
++ electronDist: "%%ELECTRON_DIST%%",
++ electronVersion: "%%ELECTRON_VERSION%%",
+ extraResources: [
+ {
+ from: 'build/launcher-script.sh',
+@@ -113,53 +115,22 @@ module.exports = {
+ role: "Editor"
+ }
+ ],
+- mac: {
+- entitlements: "./build/entitlements.mac.plist",
+- entitlementsInherit: "./build/entitlements.mac.plist",
+- icon: './public/icons/mac/bk-icon.icns',
+- category: "public.app-category.developer-tools",
+- "hardenedRuntime": true
+- },
+ linux: {
+ icon: './public/icons/png/',
+ category: "Development",
+ target: [
+- 'snap',
+- 'deb',
+- 'appImage'
++ 'dir',
++ 'pacman'
+ ],
+ desktop: {
+ 'StartupWMClass': 'beekeeper-studio'
+ },
+ },
+- deb: {
+- publish: [
+- 'github'
+- ],
+- fpm: fpmOptions,
+- // when we upgrade Electron we need to check these
+- depends: ["libgtk-3-0", "libnotify4", "libnss3", "libxss1", "libxtst6", "xdg-utils", "libatspi2.0-0", "libuuid1", "libsecret-1-0", "gnupg"]
+- },
+- appImage: {
+- publish: ['github'],
+- },
+- snap: {
+- publish: [
+- 'github',
+- 'snapStore'
+- ],
+- environment: {
+- "ELECTRON_SNAP": "true"
+- },
+- plugs: ["default", "ssh-keys", "removable-media", "mount-observe"]
+- },
+- win: {
+- icon: './public/icons/png/512x512.png',
+- target: ['nsis', 'portable']
+- },
+- portable: {
+- "artifactName": "${productName}-${version}-portable.exe",
+- },
++ pacman: {
++ fpm: [
++ '--pacman-compression=none'
++ ]
++ }
+ }
+ }
+ },
diff --git a/fix-argv.diff b/fix-argv.diff
new file mode 100644
index 000000000000..c68c20fb84c5
--- /dev/null
+++ b/fix-argv.diff
@@ -0,0 +1,13 @@
+diff --git a/apps/studio/src/background.ts b/apps/studio/src/background.ts
+index e2f50467..fa297cb7 100644
+--- a/apps/studio/src/background.ts
++++ b/apps/studio/src/background.ts
+@@ -107,7 +107,7 @@ app.on('ready', async () => {
+ console.error('Vue Devtools failed to install:', e.toString())
+ }
+ }
+- const slice = platformInfo.isDevelopment ? 2 : 1
++ const slice = platformInfo.isDevelopment ? 2 : 2
+ const parsedArgs = yargs(process.argv.slice(slice))
+ log.debug("Parsing app args", parsedArgs)
+ const options = parsedArgs._.map((url: string) => ({ url }))