Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Insomnia package
@ 2020-07-30  9:23 selfisekai
  2020-07-30  9:41 ` [PR PATCH] [Updated] " selfisekai
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: selfisekai @ 2020-07-30  9:23 UTC (permalink / raw)
  To: ml

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

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

https://github.com/selfisekai/void-packages insomnia-package
https://github.com/void-linux/void-packages/pull/23948

Insomnia package
merge #23947 first

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

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

From cf172217b1ea17856a70f669733a411fe0daf6f1 Mon Sep 17 00:00:00 2001
From: selfisekai <laura@selfisekai.rocks>
Date: Thu, 30 Jul 2020 11:19:10 +0200
Subject: [PATCH 1/2] nodejs build style

---
 common/build-style/nodejs.sh | 37 ++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 common/build-style/nodejs.sh

diff --git a/common/build-style/nodejs.sh b/common/build-style/nodejs.sh
new file mode 100644
index 00000000000..c9e749d3342
--- /dev/null
+++ b/common/build-style/nodejs.sh
@@ -0,0 +1,37 @@
+#
+# This helper is for templates for Node.js packages (including Electron.js)
+#
+
+do_configure() {
+    if [ -f "yarn.lock" ]; then
+        : ${nodejs_packager:=yarn}
+    else
+        : ${nodejs_packager:=npm}
+    fi
+
+    $nodejs_packager install
+}
+
+do_build() {
+    if [ -f "yarn.lock" ]; then
+        : ${nodejs_packager:=yarn}
+    else
+        : ${nodejs_packager:=npm}
+    fi
+
+    : ${nodejs_build_script:=build}
+
+    $nodejs_packager run $nodejs_build_script
+}
+
+do_install() {
+    if [ -f "yarn.lock" ]; then
+        : ${nodejs_packager:=yarn}
+    else
+        : ${nodejs_packager:=npm}
+    fi
+
+    : ${nodejs_install_script:=pack}  # name suggested by https://github.com/electron-userland/electron-builder#quick-setup-guide
+
+    $nodejs_packager run $nodejs_install_script
+}

From 283c8f8b3acc93567b4c684b6c6de713fefc5b60 Mon Sep 17 00:00:00 2001
From: selfisekai <laura@selfisekai.rocks>
Date: Thu, 30 Jul 2020 11:22:16 +0200
Subject: [PATCH 2/2] insomnia package

---
 srcpkgs/insomnia/files/insomnia.desktop | 11 +++++++
 srcpkgs/insomnia/template               | 40 +++++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 00000000000..66c2085f055
--- /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/lib/insomnia/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 00000000000..438e8cfaaae
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,40 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.3.3
+revision=1
+wrksrc="insomnia-core-${version}"
+build_style=nodejs
+hostmakedepends="nodejs-lts-10"
+makedepends="gcc python3 fontconfig-devel"
+short_desc="The Desktop API client for REST and GraphQL"
+maintainer="selfisekai <laura@selfisekai.rocks>"
+license="MIT"
+homepage="https://insomnia.rest/"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.zip"
+checksum=8573ad576d5eedc8b7bee56628b63526748e4913db9f4f88a0d388563743b754
+#patch_args="-Np1"
+
+# Due to electron
+archs="x86_64"
+nostrip_files="insomnia"
+
+do_build() {
+    npm run bootstrap
+    GIT_TAG="core@${version}" BUILD_TARGETS=dir npm run app-package
+}
+
+do_install() {
+    vmkdir usr/lib/insomnia
+    vcopy packages/insomnia-app/dist/linux-unpacked/* usr/lib/insomnia
+
+    vmkdir usr/bin
+    ln -sf /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+
+    vmkdir usr/share/pixmaps
+    vinstall packages/insomnia-app/app/static/icon.png 664 usr/share/pixmaps insomnia.png
+
+    vmkdir usr/share/applications
+    vinstall ${FILESDIR}/insomnia.desktop 775 usr/share/applications
+
+    vlicense LICENSE
+}

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

end of thread, other threads:[~2021-06-13 12:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  9:23 [PR PATCH] Insomnia package selfisekai
2020-07-30  9:41 ` [PR PATCH] [Updated] " selfisekai
2020-07-30 10:16 ` selfisekai
2020-07-30 10:19 ` selfisekai
2020-07-30 10:46 ` selfisekai
2020-11-04 15:53 ` kedodrill
2021-06-13 12:35 ` [PR PATCH] [Closed]: " selfisekai

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).