Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: insomnia-2020.4.2
@ 2020-11-23 16:56 kedodrill
  2020-12-02 19:05 ` kedodrill
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: kedodrill @ 2020-11-23 16:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

There is a new pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2020.4.2
Closes void-linux/issues#11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Rocket-Chat package. Please let me know if anything can be better / needs to be changed :)

I use this package almost every day for work so I will be testing it quite frequently.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 4844 bytes --]

From c26ae3430235e1482b12c60ee957159520368b53 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH] New package: insomnia-2020.4.2

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 00000000000..d9f0e988b9c
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 00000000000..73b9540c78e
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 00000000000..7df2dabba07
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 00000000000..232bf31cc8a
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 00000000000..d0af8d3fc1c
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-05-20 20:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
2020-12-02 19:05 ` kedodrill
2020-12-03 16:09 ` kedodrill
2020-12-03 20:29 ` [PR PATCH] [Updated] " kedodrill
2020-12-03 20:31 ` kedodrill
2020-12-03 20:32 ` [PR PATCH] [Updated] " kedodrill
2020-12-03 21:51 ` kedodrill
2020-12-05  1:24 ` [PR PATCH] [Updated] New package: insomnia-2020.5.0 kedodrill
2020-12-11  0:13 ` [PR PATCH] [Updated] New package: insomnia-2020.5.1 kedodrill
2020-12-11  0:14 ` New package: insomnia-2020.5.2 kedodrill
2021-03-11  2:59 ` [PR PATCH] [Updated] " kedodrill
2021-03-28 17:33 ` [PR PATCH] [Updated] New package: insomnia-2021.1.1 kedodrill
2021-05-20 20:51 ` New package: insomnia-2021.2.1 kedodrill
2021-05-20 20:51 ` [PR PATCH] [Closed]: " kedodrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).