summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDj Isaac2023-10-10 17:04:19 -0500
committerDj Isaac2023-10-10 17:04:19 -0500
commit8c931eb475289303f72e89e7ea605f47c0b979f9 (patch)
tree919e6ca16c9a4705acb696e68756d92fa28d8b0b
downloadaur-8c931eb475289303f72e89e7ea605f47c0b979f9.tar.gz
drop nvm and push electron version, welcome
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD75
-rw-r--r--com.usebruno.app.Bruno.desktop9
3 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1515c9830c8b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = bruno-electron-bin
+ pkgdesc = Opensource API Client for Exploring and Testing APIs
+ pkgver = 0.22.1
+ pkgrel = 1
+ url = https://www.usebruno.com/
+ arch = x86_64
+ license = MIT
+ makedepends = asar
+ depends = electron25
+ conflicts = bruno
+ conflicts = bruno-bin
+ conflicts = bruno-git
+ source = bruno-0.22.1.tar.gz::https://github.com/usebruno/bruno/archive/v0.22.1.tar.gz
+ source = com.usebruno.app.Bruno.desktop
+ sha256sums = 19c75aeba21cf835375a748bd41891511e5786ec583453fa2402a8ecdbf16248
+ sha256sums = 7bad0d66e67fdaaf99d1b7b32ba2f119b7d6dba12ecfdb398c39ee3c81bbe051
+
+pkgname = bruno-electron-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b36ebdd18f8a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Dj Isaac <aur at dejay dot dev>
+# Contributor: Vianney Bouchaud <aur dot vianney at bouchaud dot org>
+
+pkgname=bruno-electron-bin
+_pkgname=bruno
+pkgdesc="Opensource API Client for Exploring and Testing APIs"
+pkgver=0.22.1
+pkgrel=1
+conflicts=('bruno' 'bruno-bin' 'bruno-git')
+arch=('x86_64')
+url="https://www.usebruno.com/"
+license=('MIT')
+_electron=electron25
+depends=(
+ "${_electron}"
+)
+makedepends=(
+ 'asar'
+)
+
+source=(
+ "${_pkgname}-${pkgver}.tar.gz::https://github.com/usebruno/bruno/archive/v${pkgver}.tar.gz"
+ com.usebruno.app.Bruno.desktop
+)
+
+sha256sums=(
+ '19c75aeba21cf835375a748bd41891511e5786ec583453fa2402a8ecdbf16248'
+ '7bad0d66e67fdaaf99d1b7b32ba2f119b7d6dba12ecfdb398c39ee3c81bbe051'
+)
+
+prepare() {
+ cd "${_pkgname}-${pkgver}"
+
+ # disabling husky however I can since I'm not in a git repository
+ sed -i -e 's/"husky":.*//g' -e 's/"husky install"/"true"/g' package.json
+
+ npm install --cache "${srcdir}/npm-cache"
+}
+
+build() {
+ export NODE_ENV=production
+ export NODE_OPTIONS=--openssl-legacy-provider
+
+ cd "${_pkgname}-${pkgver}"
+
+ npm run build:bruno-query
+ npm run build:graphql-docs
+ npm run build:web
+
+ electronDist="/usr/lib/${_electron}"
+ electronVer="$(cat ${electronDist}/version)"
+ sed -i -e "s~\"dist\":.*~\"dist\": \"electron-builder --linux --x64 --dir --config electron-builder-config.js -c.electronDist=${electronDist} -c.electronVersion=${electronVer}\",~g" packages/bruno-electron/package.json
+
+ npm run build:electron
+}
+
+package() {
+ install -Dm0644 com.usebruno.app.Bruno.desktop -t "${pkgdir}/usr/share/applications/"
+
+ cd "${_pkgname}-${pkgver}"
+
+ install -Dm0755 /dev/null "${pkgdir}/usr/bin/${_pkgname}"
+ cat >> "${pkgdir}/usr/bin/${_pkgname}" <<EOD
+#! /usr/bin/sh
+ELECTRON_IS_DEV=0 exec ${_electron} /usr/lib/bruno "\$@"
+EOD
+
+ install -Dm0644 license.md "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+ install -d "${pkgdir}/usr/lib/${_pkgname}/"
+ asar e packages/bruno-electron/out/linux-unpacked/resources/app.asar "${pkgdir}/usr/lib/${_pkgname}/"
+
+ for i in 16 24 48 64 128 256 512 1024; do
+ install -Dm644 "packages/bruno-electron/resources/icons/png/${i}x${i}.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/com.usebruno.app.Bruno.png"
+ done
+}
diff --git a/com.usebruno.app.Bruno.desktop b/com.usebruno.app.Bruno.desktop
new file mode 100644
index 000000000000..a3e788363632
--- /dev/null
+++ b/com.usebruno.app.Bruno.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Bruno
+Comment=Opensource API Client for Exploring and Testing APIs
+Exec=/usr/bin/bruno %u
+Terminal=false
+Type=Application
+Icon=com.usebruno.app.Bruno
+StartupWMClass=Bruno
+Categories=Development;