Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: bruno #1253

Open
wants to merge 15 commits into
base: frawhide
Choose a base branch
from
5 changes: 5 additions & 0 deletions anda/devs/bruno/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "bruno.spec"
}
}
2 changes: 2 additions & 0 deletions anda/devs/bruno/bruno.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%!/usr/bin/sh
ELECTRON_IS_DEV=0 exec electron /usr/lib64/bruno "\$@"
63 changes: 63 additions & 0 deletions anda/devs/bruno/bruno.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Name: bruno
Version: 1.22.0
Release: 1%?dist
Summary: Opensource API Client for Exploring and Testing APIs
License: MIT
URL: https://www.usebruno.com
Source0: https://github.com/usebruno/bruno/archive/refs/tags/v%version.tar.gz
Source1: com.usebruno.app.Bruno.desktop
Source2: bruno.sh
Requires: electron alsa-lib
BuildRequires: asar electron pnpm gcc gcc-c++
BuildRequires: pkgconfig(pixman-1)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(pangocairo)

%description
Bruno is a new and innovative API client, aimed at revolutionizing the status quo represented by Postman and similar tools out there.

%prep
%autosetup
curl -fsSL https://bun.sh/install | bash

# ref aur
# 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

%build
export NODE_ENV=production
export NODE_OPTIONS=--openssl-legacy-provider
export PATH="$PATH:$HOME/.bun/bin/"


bun i
bun run build:bruno-query
bun run build:bruno-common
bun run build:graphql-docs
bun run build:web

electronDist="%_libdir/electron"
electronVer="$(cat ${electronDist}/version)"
sed -i -e "s~\"dist:linux\":.*~\"dist:linux\": \"electron-builder --linux --x64 --dir --config electron-builder-config.js -c.electronDist=${electronDist} -c.electronVersion=${electronVer}\",~g" packages/bruno-electron/package.json

bun run build:electron:linux

%install
mkdir -p %buildroot%_datadir/applications/
install -Dm644 %SOURCE1 %buildroot%_datadir/applications/
install -Dm755 %SOURCE2 %buildroot%_bindir/bruno

install -d %buildroot%_libdir/bruno
asar e packages/bruno-electron/out/linux-unpacked/resources/app.asar %buildroot%_libdir/bruno/

for i in 16 24 48 64 128 256 512 1024; do
install -Dm644 "packages/bruno-electron/resources/icons/png/${i}x${i}.png" "%buildroot%_iconsdir/hicolor/${i}x${i}/apps/com.usebruno.app.Bruno.png"
done

%files
%doc readme.md
%license license.md
%_bindir/bruno/
%_libdir/bruno/
%_datadir/applications/com.usebruno.app.Bruno.desktop
%_iconsdir/hicolor/*/apps/com.usebruno.app.Bruno.png
9 changes: 9 additions & 0 deletions anda/devs/bruno/com.usebruno.app.Bruno.desktop
Original file line number Diff line number Diff line change
@@ -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;
1 change: 1 addition & 0 deletions anda/devs/bruno/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rpm.version(gh("usebruno/bruno"));
Loading