Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: drawio-desktop-14.6.13
@ 2021-05-28 19:52 noarchwastaken
  2021-05-28 20:29 ` [PR PATCH] [Updated] " noarchwastaken
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: noarchwastaken @ 2021-05-28 19:52 UTC (permalink / raw)
  To: ml

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

There is a new 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: 5177 bytes --]

From bc4e6bb7997033f307b9abc9a9ecfbd3fae95263 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/x-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/x-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/x-drawio.xml b/srcpkgs/drawio-desktop/files/x-drawio.xml
new file mode 100644
index 000000000000..b5240e484a4a
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/x-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..0b810494c19d
--- /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 vsed '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}/x-drawio.xml" 0644 "usr/share/mime/packages"
+}

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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
@ 2021-05-28 20:29 ` noarchwastaken
  2021-05-28 20:38 ` noarchwastaken
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-05-28 20:29 UTC (permalink / raw)
  To: ml

[-- 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: 5167 bytes --]

From c3c040ddcec319d8f147d4c63b07e1e12baa60da 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..570456d381a7
--- /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 vsed '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"
+}

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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
  2021-05-28 20:29 ` [PR PATCH] [Updated] " noarchwastaken
@ 2021-05-28 20:38 ` noarchwastaken
  2021-05-28 20:59 ` noarchwastaken
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-05-28 20:38 UTC (permalink / raw)
  To: ml

[-- 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"
+}

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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
  2021-05-28 20:29 ` [PR PATCH] [Updated] " noarchwastaken
  2021-05-28 20:38 ` noarchwastaken
@ 2021-05-28 20:59 ` noarchwastaken
  2021-05-28 21:12 ` noarchwastaken
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-05-28 20:59 UTC (permalink / raw)
  To: ml

[-- 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: 5157 bytes --]

From dd887a6f74bc8fc6eb7ad386a0c637ea489dc1b1 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..4e4374f30689
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=draw.io
+Exec=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"
+}

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

* Re: New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (2 preceding siblings ...)
  2021-05-28 20:59 ` noarchwastaken
@ 2021-05-28 21:12 ` noarchwastaken
  2021-05-29  1:41 ` Johnnynator
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-05-28 21:12 UTC (permalink / raw)
  To: ml

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

New comment by noarchwastaken on void-packages repository

https://github.com/void-linux/void-packages/pull/31195#issuecomment-850672039

Comment:
I'm not sure whether the desktop entry should be called `draw.io` or `diagrams.net`.

The former is still used everywhere internally, including the executable script and the desktop file in the "official" appimage, and the latter is the current "supposed" branding but is only used in places like the about page and the window title.

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

* Re: New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (3 preceding siblings ...)
  2021-05-28 21:12 ` noarchwastaken
@ 2021-05-29  1:41 ` Johnnynator
  2021-05-29  3:46 ` noarchwastaken
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Johnnynator @ 2021-05-29  1:41 UTC (permalink / raw)
  To: ml

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

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/31195#issuecomment-850747159

Comment:
All these `find` and `for` loops make that template quite ugly to read imo. Maybe electron builder can be abused to provide a more usable directory structure.

Regarding naming an so, you could just take a look at the official '.deb' or '.rpm' and copy the naming from there.

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

* Re: New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (4 preceding siblings ...)
  2021-05-29  1:41 ` Johnnynator
@ 2021-05-29  3:46 ` noarchwastaken
  2021-05-30  4:58 ` [PR PATCH] [Updated] " noarchwastaken
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-05-29  3:46 UTC (permalink / raw)
  To: ml

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

New comment by noarchwastaken on void-packages repository

https://github.com/void-linux/void-packages/pull/31195#issuecomment-850763042

Comment:
> All these `find` and `for` loops make that template quite ugly to read imo.

Most of these are just to keep the destdir clean; [The AUR package](https://aur.archlinux.org/packages/drawio-desktop/) that I'm referencing from is pretty cursed in some places, I tweaked it significantly but kept the cleanup process.
I'm pretty sure everything will work fine without the cleanup; but the size of the produced package might be a tiny bit bigger.
Your opinion on removing that bit for extra readability?

> Maybe electron builder can be abused to provide a more usable directory structure.

I had a peek at your `Rocket.Chat-Desktop` package, it seems like Rocket.Chat supports `electron-builder` OOTB so you can simply `yarn run electron-builder ...` to build it.
However `draw.io` doesn't seem to support it, so I might have to write an `electron-builder.json` and so on...

> Regarding naming an so, you could just take a look at the official '.deb' or '.rpm' and copy the naming from there.

The official `.deb` and `.rpm` are pretty much just uncompressed appimage, installed in `/opt`. They still use `drawio`, so I think I'm fine here.


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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (5 preceding siblings ...)
  2021-05-29  3:46 ` noarchwastaken
@ 2021-05-30  4:58 ` noarchwastaken
  2021-06-13  3:01 ` noarchwastaken
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-05-30  4:58 UTC (permalink / raw)
  To: ml

[-- 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: 5158 bytes --]

From b2025f7e3151039d23f76e44d3e06c88cac06f46 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..4e4374f30689
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=draw.io
+Exec=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..b92d017d079f
--- /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="application/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"
+}

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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (6 preceding siblings ...)
  2021-05-30  4:58 ` [PR PATCH] [Updated] " noarchwastaken
@ 2021-06-13  3:01 ` noarchwastaken
  2021-06-13  3:03 ` noarchwastaken
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-06-13  3:01 UTC (permalink / raw)
  To: ml

[-- 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: 5219 bytes --]

From 243dc937e6a21fef2dd61ce3765a1ddebdec73b3 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             | 76 +++++++++++++++++++++
 4 files changed, 96 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..719030008c28
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron12 /usr/lib/drawio-desktop.asar "$@"
diff --git a/srcpkgs/drawio-desktop/files/drawio.desktop b/srcpkgs/drawio-desktop/files/drawio.desktop
new file mode 100644
index 000000000000..4e4374f30689
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=draw.io
+Exec=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..b92d017d079f
--- /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="application/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..d33c5e6cea90
--- /dev/null
+++ b/srcpkgs/drawio-desktop/template
@@ -0,0 +1,76 @@
+# Template file for 'drawio-desktop'
+pkgname=drawio-desktop
+version=14.6.13
+revision=1
+_electron_ver=12
+hostmakedepends="yarn app-builder"
+makedepends="electron${_electron_ver}"
+depends="electron${_electron_ver} 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_extract() {
+	# simulate git-submodules
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-v${version}.tar.gz --strip-components=1
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/drawio-v${version}.tar.gz --strip-components=1 -C drawio
+}
+
+do_configure() {
+	# disable updater
+	vsed '/electron-updater/d' -i package.json drawio/src/main/webapp/package.json
+	UPDATER='const autoUpdater = { on: () => {}, setFeedURL: () => {}, checkForUpdates: () => {} }'
+	vsed -e 's/.*require("electron-updater").*/'"${UPDATER}"'/' -e '/checkForUpdates,/d' -i drawio/src/main/webapp/electron.js
+}
+
+do_build() {
+	export USE_SYSTEM_APP_BUILDER=true
+	export NODE_ENV=production
+
+	yarn add electron-builder electron-notarize # for electron-builder
+	yarn install
+	yarn sync
+	yarn run electron-builder --linux --x64 --dir \
+		--config electron-builder-linux-mac.json \
+		-c.electronDist=/usr/lib/electron${_electron_ver} \
+		-c.electronVersion="$(</usr/lib/electron${_electron_ver}/version)"
+}
+
+do_install() {
+	vinstall "dist/linux-unpacked/resources/app.asar" 644 /usr/lib "drawio-desktop.asar"
+
+	vbin "${FILESDIR}/drawio"
+
+	# create desktop file
+	vinstall "${FILESDIR}/drawio.desktop" 0644 "usr/share/applications"
+
+	# bitmap icons
+	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
+
+	# vector icons
+	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"
+}

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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (7 preceding siblings ...)
  2021-06-13  3:01 ` noarchwastaken
@ 2021-06-13  3:03 ` noarchwastaken
  2021-06-13  3:04 ` noarchwastaken
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-06-13  3:03 UTC (permalink / raw)
  To: ml

[-- 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: 5219 bytes --]

From b42c6ab3163201eecb0d98b2894333810145e5a7 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             | 76 +++++++++++++++++++++
 4 files changed, 96 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..719030008c28
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron12 /usr/lib/drawio-desktop.asar "$@"
diff --git a/srcpkgs/drawio-desktop/files/drawio.desktop b/srcpkgs/drawio-desktop/files/drawio.desktop
new file mode 100644
index 000000000000..4e4374f30689
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=draw.io
+Exec=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..b92d017d079f
--- /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="application/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..d33c5e6cea90
--- /dev/null
+++ b/srcpkgs/drawio-desktop/template
@@ -0,0 +1,76 @@
+# Template file for 'drawio-desktop'
+pkgname=drawio-desktop
+version=14.6.13
+revision=1
+_electron_ver=12
+hostmakedepends="yarn app-builder"
+makedepends="electron${_electron_ver}"
+depends="electron${_electron_ver} 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_extract() {
+	# simulate git-submodules
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-v${version}.tar.gz --strip-components=1
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/drawio-v${version}.tar.gz --strip-components=1 -C drawio
+}
+
+do_configure() {
+	# disable updater
+	vsed '/electron-updater/d' -i package.json drawio/src/main/webapp/package.json
+	UPDATER='const autoUpdater = { on: () => {}, setFeedURL: () => {}, checkForUpdates: () => {} }'
+	vsed -e 's/.*require("electron-updater").*/'"${UPDATER}"'/' -e '/checkForUpdates,/d' -i drawio/src/main/webapp/electron.js
+}
+
+do_build() {
+	export USE_SYSTEM_APP_BUILDER=true
+	export NODE_ENV=production
+
+	yarn add electron-builder electron-notarize # for electron-builder
+	yarn install
+	yarn sync
+	yarn run electron-builder --linux --x64 --dir \
+		--config electron-builder-linux-mac.json \
+		-c.electronDist=/usr/lib/electron${_electron_ver} \
+		-c.electronVersion="$(</usr/lib/electron${_electron_ver}/version)"
+}
+
+do_install() {
+	vinstall "dist/linux-unpacked/resources/app.asar" 644 /usr/lib "drawio-desktop.asar"
+
+	vbin "${FILESDIR}/drawio"
+
+	# create desktop file
+	vinstall "${FILESDIR}/drawio.desktop" 0644 "usr/share/applications"
+
+	# bitmap icons
+	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
+
+	# vector icons
+	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"
+}

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

* Re: New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (8 preceding siblings ...)
  2021-06-13  3:03 ` noarchwastaken
@ 2021-06-13  3:04 ` noarchwastaken
  2021-06-13  3:14 ` [PR PATCH] [Updated] " noarchwastaken
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-06-13  3:04 UTC (permalink / raw)
  To: ml

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

New comment by noarchwastaken on void-packages repository

https://github.com/void-linux/void-packages/pull/31195#issuecomment-860143370

Comment:
@Johnnynator nvm, I just realized that drawio-desktop actually have electron-builder configs.

I have updated the template to use electron-builder, please have a look ;)

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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (9 preceding siblings ...)
  2021-06-13  3:04 ` noarchwastaken
@ 2021-06-13  3:14 ` noarchwastaken
  2021-06-13  3:51 ` noarchwastaken
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-06-13  3:14 UTC (permalink / raw)
  To: ml

[-- 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: 5207 bytes --]

From c6dd89547ef16a9f2851e30f6d8d21343ca13764 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             | 76 +++++++++++++++++++++
 4 files changed, 96 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..719030008c28
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron12 /usr/lib/drawio-desktop.asar "$@"
diff --git a/srcpkgs/drawio-desktop/files/drawio.desktop b/srcpkgs/drawio-desktop/files/drawio.desktop
new file mode 100644
index 000000000000..80bc4e74dea7
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=draw.io
+Exec=drawio %U
+Terminal=false
+Type=Application
+Icon=drawio
+StartupWMClass=drawio
+Comment=diagrams.net desktop
+MimeType=application/vnd.jgraph.mxfile;application/vnd.visio;
+Categories=Graphics;
diff --git a/srcpkgs/drawio-desktop/files/drawio.xml b/srcpkgs/drawio-desktop/files/drawio.xml
new file mode 100644
index 000000000000..686729c26673
--- /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/vnd.jgraph.mxfile">
+		<sub-class-of type="application/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..d33c5e6cea90
--- /dev/null
+++ b/srcpkgs/drawio-desktop/template
@@ -0,0 +1,76 @@
+# Template file for 'drawio-desktop'
+pkgname=drawio-desktop
+version=14.6.13
+revision=1
+_electron_ver=12
+hostmakedepends="yarn app-builder"
+makedepends="electron${_electron_ver}"
+depends="electron${_electron_ver} 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_extract() {
+	# simulate git-submodules
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-v${version}.tar.gz --strip-components=1
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/drawio-v${version}.tar.gz --strip-components=1 -C drawio
+}
+
+do_configure() {
+	# disable updater
+	vsed '/electron-updater/d' -i package.json drawio/src/main/webapp/package.json
+	UPDATER='const autoUpdater = { on: () => {}, setFeedURL: () => {}, checkForUpdates: () => {} }'
+	vsed -e 's/.*require("electron-updater").*/'"${UPDATER}"'/' -e '/checkForUpdates,/d' -i drawio/src/main/webapp/electron.js
+}
+
+do_build() {
+	export USE_SYSTEM_APP_BUILDER=true
+	export NODE_ENV=production
+
+	yarn add electron-builder electron-notarize # for electron-builder
+	yarn install
+	yarn sync
+	yarn run electron-builder --linux --x64 --dir \
+		--config electron-builder-linux-mac.json \
+		-c.electronDist=/usr/lib/electron${_electron_ver} \
+		-c.electronVersion="$(</usr/lib/electron${_electron_ver}/version)"
+}
+
+do_install() {
+	vinstall "dist/linux-unpacked/resources/app.asar" 644 /usr/lib "drawio-desktop.asar"
+
+	vbin "${FILESDIR}/drawio"
+
+	# create desktop file
+	vinstall "${FILESDIR}/drawio.desktop" 0644 "usr/share/applications"
+
+	# bitmap icons
+	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
+
+	# vector icons
+	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"
+}

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

* Re: [PR PATCH] [Updated] New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (10 preceding siblings ...)
  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
  13 siblings, 0 replies; 15+ messages in thread
From: noarchwastaken @ 2021-06-13  3:51 UTC (permalink / raw)
  To: ml

[-- 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: 5225 bytes --]

From a01385986cbc0640509e35176d5e8d39e4e4158c 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             | 76 +++++++++++++++++++++
 4 files changed, 96 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..719030008c28
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron12 /usr/lib/drawio-desktop.asar "$@"
diff --git a/srcpkgs/drawio-desktop/files/drawio.desktop b/srcpkgs/drawio-desktop/files/drawio.desktop
new file mode 100644
index 000000000000..80bc4e74dea7
--- /dev/null
+++ b/srcpkgs/drawio-desktop/files/drawio.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=draw.io
+Exec=drawio %U
+Terminal=false
+Type=Application
+Icon=drawio
+StartupWMClass=drawio
+Comment=diagrams.net desktop
+MimeType=application/vnd.jgraph.mxfile;application/vnd.visio;
+Categories=Graphics;
diff --git a/srcpkgs/drawio-desktop/files/drawio.xml b/srcpkgs/drawio-desktop/files/drawio.xml
new file mode 100644
index 000000000000..686729c26673
--- /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/vnd.jgraph.mxfile">
+		<sub-class-of type="application/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..6e4c548b4385
--- /dev/null
+++ b/srcpkgs/drawio-desktop/template
@@ -0,0 +1,76 @@
+# Template file for 'drawio-desktop'
+pkgname=drawio-desktop
+version=14.6.13
+revision=1
+_electron_ver=12
+hostmakedepends="yarn app-builder"
+makedepends="electron${_electron_ver}"
+depends="electron${_electron_ver} 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_extract() {
+	# simulate git-submodules
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-v${version}.tar.gz --strip-components=1
+	bsdtar -x --no-same-permissions --no-same-owner -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/drawio-v${version}.tar.gz --strip-components=1 -C drawio
+}
+
+do_configure() {
+	# disable updater
+	vsed '/electron-updater/d' -i package.json drawio/src/main/webapp/package.json
+	UPDATER='const autoUpdater = { on: () => {}, setFeedURL: () => {}, checkForUpdates: () => {} }'
+	vsed -e 's/.*require("electron-updater").*/'"${UPDATER}"'/' -e '/checkForUpdates,/d' -i drawio/src/main/webapp/electron.js
+}
+
+do_build() {
+	export USE_SYSTEM_APP_BUILDER=true
+	export NODE_ENV=production
+
+	yarn add electron-builder electron-notarize # for electron-builder
+	yarn install
+	yarn sync
+	yarn run electron-builder --linux --x64 --dir \
+		--config electron-builder-linux-mac.json \
+		-c.electronDist=/usr/lib/electron${_electron_ver} \
+		-c.electronVersion="$(</usr/lib/electron${_electron_ver}/version)"
+}
+
+do_install() {
+	vinstall "dist/linux-unpacked/resources/app.asar" 644 /usr/lib "drawio-desktop.asar"
+
+	vbin "${FILESDIR}/drawio"
+
+	# create desktop file
+	vinstall "${FILESDIR}/drawio.desktop" 0644 "usr/share/applications"
+
+	# bitmap icons
+	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-vnd.jgraph.mxfile.png"
+		fi
+	done
+
+	# vector icons
+	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-vnd.jgraph.mxfile.svg"
+
+	# create mime type
+	vinstall "${FILESDIR}/drawio.xml" 0644 "usr/share/mime/packages"
+}

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

* Re: New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (11 preceding siblings ...)
  2021-06-13  3:51 ` noarchwastaken
@ 2022-05-21  1:59 ` github-actions
  2022-06-04  2:08 ` [PR PATCH] [Closed]: " github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-05-21  1:59 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/31195#issuecomment-1133500094

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: [PR PATCH] [Closed]: New package: drawio-desktop-14.6.13
  2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
                   ` (12 preceding siblings ...)
  2022-05-21  1:59 ` github-actions
@ 2022-06-04  2:08 ` github-actions
  13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-06-04  2:08 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

New package: drawio-desktop-14.6.13
https://github.com/void-linux/void-packages/pull/31195

Description:
<!-- 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
-->


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

end of thread, other threads:[~2022-06-04  2:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 19:52 [PR PATCH] New package: drawio-desktop-14.6.13 noarchwastaken
2021-05-28 20:29 ` [PR PATCH] [Updated] " noarchwastaken
2021-05-28 20:38 ` noarchwastaken
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

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