Github messages for voidlinux
 help / color / mirror / Atom feed
From: noarchwastaken <noarchwastaken@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
Date: Fri, 28 May 2021 22:38:16 +0200	[thread overview]
Message-ID: <20210528203816.7mcjMu7C-gEgpdB1_aCizRK78EHtqKD-Kl0NdRbk_4I@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31195@inbox.vuxu.org>

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

There is an updated pull request by noarchwastaken against master on the void-packages repository

https://github.com/noarchwastaken/void-packages drawio-desktop
https://github.com/void-linux/void-packages/pull/31195

New package: drawio-desktop-14.6.13
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 6a08270d2aabe02353858c928313421b1bbeaeef Mon Sep 17 00:00:00 2001
From: noarchwastaken <noarch@n0ar.ch>
Date: Fri, 28 May 2021 15:50:16 -0400
Subject: [PATCH] New package: drawio-desktop-14.6.13

---
 srcpkgs/drawio-desktop/files/drawio         |  2 +
 srcpkgs/drawio-desktop/files/drawio.desktop | 10 +++
 srcpkgs/drawio-desktop/files/drawio.xml     |  8 ++
 srcpkgs/drawio-desktop/template             | 88 +++++++++++++++++++++
 4 files changed, 108 insertions(+)
 create mode 100644 srcpkgs/drawio-desktop/files/drawio
 create mode 100644 srcpkgs/drawio-desktop/files/drawio.desktop
 create mode 100644 srcpkgs/drawio-desktop/files/drawio.xml
 create mode 100644 srcpkgs/drawio-desktop/template

diff --git a/srcpkgs/drawio-desktop/files/drawio b/srcpkgs/drawio-desktop/files/drawio
new file mode 100644
index 000000000000..fd9908e2d3c8
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron12 /usr/lib/drawio "$@"
diff --git a/srcpkgs/drawio-desktop/files/drawio.desktop b/srcpkgs/drawio-desktop/files/drawio.desktop
new file mode 100644
index 000000000000..6d14b41131ae
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=draw.io
+Exec=/usr/bin/drawio %U
+Terminal=false
+Type=Application
+Icon=drawio
+StartupWMClass=drawio
+Comment=diagrams.net desktop
+MimeType=application/vnd.jgraph.mxfile;application/vnd.visio;application/x-drawio;
+Categories=Graphics;
diff --git a/srcpkgs/drawio-desktop/files/drawio.xml b/srcpkgs/drawio-desktop/files/drawio.xml
new file mode 100644
index 000000000000..b5240e484a4a
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+	<mime-type type="application/x-drawio">
+		<sub-class-of type="appliction/xml"/>
+		<comment>draw.io Diagrams</comment>
+		<glob pattern="*.drawio"/>
+	</mime-type>
+</mime-info>
diff --git a/srcpkgs/drawio-desktop/template b/srcpkgs/drawio-desktop/template
new file mode 100644
index 000000000000..e632656f99e7
--- /dev/null
+++ b/srcpkgs/drawio-desktop/template
@@ -0,0 +1,88 @@
+# Template file for 'drawio-desktop'
+pkgname=drawio-desktop
+version=14.6.13
+revision=1
+wrksrc=drawio-${version}
+create_wrksrc=yes
+build_wrksrc=drawio-${version}/src/main/webapp
+hostmakedepends="yarn"
+depends="electron12 libnotify"
+short_desc="Diagram drawing application built on web technology"
+maintainer="noarchwastaken <noarch@n0ar.ch>"
+license="Apache-2.0"
+homepage="https://github.com/jgraph/drawio-desktop"
+distfiles="
+ https://github.com/jgraph/drawio/archive/v${version}.tar.gz>drawio-v${version}.tar.gz
+ https://github.com/jgraph/drawio-desktop/archive/v${version}.tar.gz>drawio-desktop-v${version}.tar.gz"
+checksum="83f27e7acafa434bc3287081ef5cdd5000c03c7c175e078cae4f997ff7100120
+ fa7e1916844fb2b5d6227ec3f2a753f8ee1de074ad05b24d770d586ab0e8bd43"
+
+do_configure() {
+	rm -rf "META-INF" "WEB-INF"
+
+	# disable updater
+	vsed '/electron-updater/d' -i 'package.json'
+	updater='const autoUpdater = { on: () => {}, setFeedURL: () => {}, checkForUpdates: () => {} }'
+	vsed -e 's/.*require("electron-updater").*/'"${updater}"'/' -e '/checkForUpdates,/d' -i 'electron.js'
+
+	# fix version in package.json
+	vsed 's/"version": ".*"/"version": "'"${version}"'"/g' -i package.json
+}
+
+do_build() {
+	yarn install --prod
+	yarn autoclean -I
+	yarn autoclean -F
+}
+
+post_build() {
+	# remove paths refering build directories
+	find . -name 'package.json' -exec sed 's,src/main/webapp,/usr/lib/drawio,g' -i {} \;
+
+	rm -f "package-lock.json"
+
+	for i in ".yarnclean" "yarn.lock" ".airtap.yml" ".coveralls.yml" \
+	 ".gitignore" ".eslintrc*" ".jscs.json" ".npmignore" \
+	 ".prettierrc.js" ".travis.yml" ".tonic_example.js" \
+	 ".bin" "well-known" ".github"; do
+		find . -name ${i} -exec rm -rf {} +
+	done
+}
+
+do_install() {
+	vmkdir "usr/lib"
+	vcopy . "usr/lib/drawio"
+
+	# fix file permissions
+	chmod -R go+r "${DESTDIR}/usr/lib/drawio"
+
+	vbin ${FILESDIR}/drawio
+
+	# create desktop file
+	vinstall "${FILESDIR}/drawio.desktop" 0644 "usr/share/applications"
+
+	# create icons and link to mimetypes
+	cd "${wrksrc}/drawio-desktop-${version}"
+
+	find 'build' -regex '.*/[0-9]+x[0-9]+\.png' |
+	grep -o '[0-9]\+' |
+	sort -u |
+	while read size; do
+		if [[ -f "build/${size}x${size}.png" ]]; then
+			vinstall "build/${size}x${size}.png" 0644 \
+				"usr/share/icons/hicolor/${size}x${size}/apps" "drawio.png"
+			vmkdir "usr/share/icons/hicolor/${size}x${size}/mimetypes"
+			ln -s "/usr/share/icons/hicolor/${size}x${size}/apps/drawio.png" \
+				"${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/mimetypes/application-x-drawio.png"
+		fi
+	done
+
+	vinstall "build/icon.svg" 0644 \
+		"/usr/share/icons/hicolor/scalable/apps" "drawio.svg"
+	vmkdir "usr/share/icons/hicolor/scalable/mimetypes"
+	ln -s "/usr/share/icons/hicolor/scalable/apps/drawio.svg" \
+		"${DESTDIR}/usr/share/icons/hicolor/scalable/mimetypes/application-x-drawio.svg"
+
+	# create mime type
+	vinstall "${FILESDIR}/drawio.xml" 0644 "usr/share/mime/packages"
+}

  parent reply	other threads:[~2021-05-28 20:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 19:52 [PR PATCH] " noarchwastaken
2021-05-28 20:29 ` [PR PATCH] [Updated] " noarchwastaken
2021-05-28 20:38 ` noarchwastaken [this message]
2021-05-28 20:59 ` noarchwastaken
2021-05-28 21:12 ` noarchwastaken
2021-05-29  1:41 ` Johnnynator
2021-05-29  3:46 ` noarchwastaken
2021-05-30  4:58 ` [PR PATCH] [Updated] " noarchwastaken
2021-06-13  3:01 ` noarchwastaken
2021-06-13  3:03 ` noarchwastaken
2021-06-13  3:04 ` noarchwastaken
2021-06-13  3:14 ` [PR PATCH] [Updated] " noarchwastaken
2021-06-13  3:51 ` noarchwastaken
2022-05-21  1:59 ` github-actions
2022-06-04  2:08 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210528203816.7mcjMu7C-gEgpdB1_aCizRK78EHtqKD-Kl0NdRbk_4I@z \
    --to=noarchwastaken@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).