* [PR PATCH] New package: mattermost-desktop-4.5.2
@ 2020-07-25 10:43 ashpooljh
2020-07-25 10:55 ` [PR REVIEW] " pullmoll
` (18 more replies)
0 siblings, 19 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 10:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 874 bytes --]
There is a new pull request by ashpooljh against master on the void-packages repository
https://github.com/ashpooljh/void-packages mattermost-desktop
https://github.com/void-linux/void-packages/pull/23827
New package: mattermost-desktop-4.5.2
OK, I know this is yet another Electron monstrosity [nobody ever asked for](https://github.com/void-linux/void-packages/issues?q=mattermost), but there are actually people out there using it. Believe it or not, I personally find it slightly less annoying than Slack. Even Stallman [recommends](https://stallman.org/slack.html) it!
By the way, this is my first attempt both at creating a Void package AND at building and packaging an Electron application, so it's probably a mess. I'm looking forward to receiving comments and remarks.
A patch file from https://github.com/void-linux/void-packages/pull/23827.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mattermost-desktop-23827.patch --]
[-- Type: text/x-diff, Size: 3810 bytes --]
From c2dd47e9e892731161fd900eaf3204a82fb6781a Mon Sep 17 00:00:00 2001
From: Artem Zhurikhin <ashpool@xecut.net>
Date: Sat, 25 Jul 2020 13:32:25 +0300
Subject: [PATCH] New package: mattermost-desktop-4.5.2
---
.../patches/10-only-build-unpacked.patch | 7 +++
.../patches/20-create-desktop-file.patch | 17 +++++++
srcpkgs/mattermost-desktop/template | 50 +++++++++++++++++++
3 files changed, 74 insertions(+)
create mode 100644 srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
create mode 100644 srcpkgs/mattermost-desktop/template
diff --git a/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
new file mode 100644
index 00000000000..7cbf34356a3
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
@@ -0,0 +1,7 @@
+--- electron-builder.json.orig 2020-07-25 12:41:25.091865817 +0300
++++ electron-builder.json 2020-07-25 12:41:41.889843654 +0300
+@@ -38,3 +38 @@
+- "deb",
+- "tar.gz",
+- "appimage"
++ "dir"
diff --git a/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
new file mode 100644
index 00000000000..8cb468d77b9
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
@@ -0,0 +1,17 @@
+--- electron-builder.json.orig 2020-07-25 12:46:12.470489136 +0300
++++ electron-builder.json 2020-07-25 12:47:22.490397616 +0300
+@@ -52 +52,2 @@
+- "README.md"
++ "README.md",
++ "Mattermost.desktop"
+--- resources/linux/Mattermost.desktop.orig 1970-01-01 03:00:00.000000000 +0300
++++ resources/linux/Mattermost.desktop 2020-07-25 12:49:12.938253258 +0300
+@@ -0,0 +1,8 @@
++[Desktop Entry]
++Name=Mattermost
++Comment=Mattermost Desktop application for Linux
++Exec=/usr/bin/mattermost-desktop/mattermost-desktop
++Terminal=false
++Type=Application
++Icon=/usr/libexec/mattermost-desktop/icon.svg
++Categories=Network;InstantMessaging;
diff --git a/srcpkgs/mattermost-desktop/template b/srcpkgs/mattermost-desktop/template
new file mode 100644
index 00000000000..81a4332e2e6
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/template
@@ -0,0 +1,50 @@
+# Template file for 'mattermost-desktop'
+pkgname=mattermost-desktop
+version=4.5.2
+revision=1
+archs="x86_64" # no musl due to electron
+wrksrc="mattermost-desktop-${version}"
+# electron-builder needs GNU tar
+hostmakedepends="git wget nodejs-lts-10 python libicns GraphicsMagick xz tar"
+short_desc="Team messaging app, an open source Slack alternative"
+maintainer="Artem Zhurikhin <ashpool@xecut.net>"
+license="Apache-2.0"
+homepage="https://mattermost.com/"
+checksum=17e32346592d175f091a4f12068e0cfc5cfd20ed7894f88bb5b54b2eb6eac74a
+
+# In the source archive the top-level dir is named "desktop-${version}/"
+# It does not contain the name of the package, so we need custom fetch & extract
+
+_disturl="https://github.com/mattermost/desktop/archive/v${version}.tar.gz"
+_distfile="mattermost-desktop-${version}.tar.gz"
+
+do_fetch() {
+ wget -O "${_distfile}" "${_disturl}"
+}
+
+do_extract() {
+ pwd
+ bsdtar -C ${wrksrc} \
+ -xzf "${XBPS_BUILDDIR}/${_distfile}" \
+ --strip-components=1 \
+ desktop-${version}
+}
+
+pre_build() {
+ rm package-lock.json ||: # Is it even OK to leave this in the distribution?
+ npm install
+}
+
+do_build() {
+ npm run build
+ npm run package:linux
+}
+
+do_install() {
+ cd release/linux-unpacked
+ vmkdir usr/libexec/${pkgname}
+ vcopy . usr/libexec/${pkgname}
+ vinstall Mattermost.desktop 644 usr/share/applications
+ vmkdir usr/bin
+ ln -s ../libexec/mattermost-desktop ${DESTDIR}/usr/bin/mattermost-desktop
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
@ 2020-07-25 10:55 ` pullmoll
2020-07-25 10:58 ` pullmoll
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pullmoll @ 2020-07-25 10:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
New review comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460393185
Comment:
You can use `create_wrksrc=yes` for such cases. The contents of the tarball will be extracted there.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
2020-07-25 10:55 ` [PR REVIEW] " pullmoll
@ 2020-07-25 10:58 ` pullmoll
2020-07-25 11:04 ` ashpooljh
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pullmoll @ 2020-07-25 10:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
New review comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460393293
Comment:
Ah, this makes sense now... Just use `wrksrc="desktop-${version}"` in the template and you can let `xbps-src` manage the rest.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
2020-07-25 10:55 ` [PR REVIEW] " pullmoll
2020-07-25 10:58 ` pullmoll
@ 2020-07-25 11:04 ` ashpooljh
2020-07-25 11:07 ` ashpooljh
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 11:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
New review comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460393797
Comment:
Ok, but it felt wrong that the `wrksrc` would not contain the name of the package at all. I thought that could cause confusion and collisions. Should I not be concerned with the possibility of another package extracting itself into a directory with such a name?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (2 preceding siblings ...)
2020-07-25 11:04 ` ashpooljh
@ 2020-07-25 11:07 ` ashpooljh
2020-07-25 11:08 ` pullmoll
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 11:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 430 bytes --]
New review comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460393797
Comment:
Ok, but it felt wrong that the `wrksrc` would not contain the name of the package (i.e. `mattermost`) at all. I thought that could cause confusion and collisions. Should I not be concerned with the possibility of another package extracting itself into a directory with such a name?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (3 preceding siblings ...)
2020-07-25 11:07 ` ashpooljh
@ 2020-07-25 11:08 ` pullmoll
2020-07-25 11:09 ` pullmoll
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pullmoll @ 2020-07-25 11:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
New review comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460394176
Comment:
The `$wrksrc` is removed again once the package is built. The name can be arbitrary and doesn't matter most of the time (pun intended :+1:
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (4 preceding siblings ...)
2020-07-25 11:08 ` pullmoll
@ 2020-07-25 11:09 ` pullmoll
2020-07-25 11:09 ` ashpooljh
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pullmoll @ 2020-07-25 11:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
New review comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460394176
Comment:
The `$wrksrc` is removed again once the package is built. The name can be arbitrary and doesn't matter most of the time (pun intended :)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (5 preceding siblings ...)
2020-07-25 11:09 ` pullmoll
@ 2020-07-25 11:09 ` ashpooljh
2020-07-25 11:56 ` [PR PATCH] [Updated] " ashpooljh
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 11:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
New review comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460393797
Comment:
Ok, but it felt wrong that the `wrksrc` would not contain the name of the package (i.e. `mattermost`) at all. I thought that could cause confusion and collisions. Should I not be concerned for the possibility of another package extracting itself into a directory with such a name?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (6 preceding siblings ...)
2020-07-25 11:09 ` ashpooljh
@ 2020-07-25 11:56 ` ashpooljh
2020-07-25 12:14 ` ashpooljh
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 11:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
There is an updated pull request by ashpooljh against master on the void-packages repository
https://github.com/ashpooljh/void-packages mattermost-desktop
https://github.com/void-linux/void-packages/pull/23827
New package: mattermost-desktop-4.5.2
OK, I know this is yet another Electron monstrosity [nobody ever asked for](https://github.com/void-linux/void-packages/issues?q=mattermost), but there are actually people out there using it. Believe it or not, I personally find it slightly less annoying than Slack. Even Stallman [recommends](https://stallman.org/slack.html) it!
By the way, this is my first attempt both at creating a Void package AND at building and packaging an Electron application, so it's probably a mess. I'm looking forward to receiving comments and remarks.
A patch file from https://github.com/void-linux/void-packages/pull/23827.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mattermost-desktop-23827.patch --]
[-- Type: text/x-diff, Size: 3311 bytes --]
From 2f80515789977910caee6d01ba87c4b7d5e92828 Mon Sep 17 00:00:00 2001
From: Artem Zhurikhin <ashpool@xecut.net>
Date: Sat, 25 Jul 2020 13:32:25 +0300
Subject: [PATCH] New package: mattermost-desktop-4.5.2
---
.../patches/10-only-build-unpacked.patch | 7 ++++
.../patches/20-create-desktop-file.patch | 17 ++++++++++
srcpkgs/mattermost-desktop/template | 32 +++++++++++++++++++
3 files changed, 56 insertions(+)
create mode 100644 srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
create mode 100644 srcpkgs/mattermost-desktop/template
diff --git a/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
new file mode 100644
index 00000000000..7cbf34356a3
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
@@ -0,0 +1,7 @@
+--- electron-builder.json.orig 2020-07-25 12:41:25.091865817 +0300
++++ electron-builder.json 2020-07-25 12:41:41.889843654 +0300
+@@ -38,3 +38 @@
+- "deb",
+- "tar.gz",
+- "appimage"
++ "dir"
diff --git a/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
new file mode 100644
index 00000000000..8cb468d77b9
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
@@ -0,0 +1,17 @@
+--- electron-builder.json.orig 2020-07-25 12:46:12.470489136 +0300
++++ electron-builder.json 2020-07-25 12:47:22.490397616 +0300
+@@ -52 +52,2 @@
+- "README.md"
++ "README.md",
++ "Mattermost.desktop"
+--- resources/linux/Mattermost.desktop.orig 1970-01-01 03:00:00.000000000 +0300
++++ resources/linux/Mattermost.desktop 2020-07-25 12:49:12.938253258 +0300
+@@ -0,0 +1,8 @@
++[Desktop Entry]
++Name=Mattermost
++Comment=Mattermost Desktop application for Linux
++Exec=/usr/bin/mattermost-desktop/mattermost-desktop
++Terminal=false
++Type=Application
++Icon=/usr/libexec/mattermost-desktop/icon.svg
++Categories=Network;InstantMessaging;
diff --git a/srcpkgs/mattermost-desktop/template b/srcpkgs/mattermost-desktop/template
new file mode 100644
index 00000000000..29ff00a2ee6
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/template
@@ -0,0 +1,32 @@
+# Template file for 'mattermost-desktop'
+pkgname=mattermost-desktop
+version=4.5.2
+revision=1
+archs="x86_64" # no musl due to electron
+wrksrc="desktop-${version}"
+# electron-builder needs GNU tar
+hostmakedepends="git nodejs-lts-10 python libicns GraphicsMagick xz tar"
+short_desc="Team messaging app, an open source Slack alternative"
+maintainer="Artem Zhurikhin <ashpool@xecut.net>"
+license="Apache-2.0"
+homepage="https://mattermost.com/"
+distfiles="https://github.com/mattermost/desktop/archive/v${version}.tar.gz"
+checksum=17e32346592d175f091a4f12068e0cfc5cfd20ed7894f88bb5b54b2eb6eac74a
+
+pre_build() {
+ npm install
+}
+
+do_build() {
+ npm run build
+ npm run package:linux
+}
+
+do_install() {
+ cd release/linux-unpacked
+ vmkdir usr/libexec/${pkgname}
+ vcopy . usr/libexec/${pkgname}
+ vinstall Mattermost.desktop 644 usr/share/applications
+ vmkdir usr/bin
+ ln -s ../libexec/mattermost-desktop ${DESTDIR}/usr/bin/mattermost-desktop
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (7 preceding siblings ...)
2020-07-25 11:56 ` [PR PATCH] [Updated] " ashpooljh
@ 2020-07-25 12:14 ` ashpooljh
2020-07-25 16:23 ` [PR PATCH] [Updated] " ashpooljh
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 12:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
New comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#issuecomment-663848725
Comment:
Getting this error from Travis:
`ModuleNotFoundError: Module not found: Error: Can't resolve 'electron-is-dev' in '/builddir/desktop-4.5.2/src'`
moreover,
`/builddir/desktop-4.5.2/src/node_modules doesn't exist or is not a directory`
Weird. Builds OK on my machine, where `/builddir/desktop-4.5.2/src/node_modules` very much exists and is a directory. `electron-is-dev` is in it, too. Can someone knowledgeable in Node help figure this one out?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (8 preceding siblings ...)
2020-07-25 12:14 ` ashpooljh
@ 2020-07-25 16:23 ` ashpooljh
2020-07-25 16:32 ` ashpooljh
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 16:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
There is an updated pull request by ashpooljh against master on the void-packages repository
https://github.com/ashpooljh/void-packages mattermost-desktop
https://github.com/void-linux/void-packages/pull/23827
New package: mattermost-desktop-4.5.2
OK, I know this is yet another Electron monstrosity [nobody ever asked for](https://github.com/void-linux/void-packages/issues?q=mattermost), but there are actually people out there using it. Believe it or not, I personally find it slightly less annoying than Slack. Even Stallman [recommends](https://stallman.org/slack.html) it!
By the way, this is my first attempt both at creating a Void package AND at building and packaging an Electron application, so it's probably a mess. I'm looking forward to receiving comments and remarks.
A patch file from https://github.com/void-linux/void-packages/pull/23827.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mattermost-desktop-23827.patch --]
[-- Type: text/x-diff, Size: 3995 bytes --]
From 80e4894ac1ee3bf12d5f037d62ccee84b605a2cf Mon Sep 17 00:00:00 2001
From: Artem Zhurikhin <ashpool@xecut.net>
Date: Sat, 25 Jul 2020 19:19:26 +0300
Subject: [PATCH] New package: mattermost-desktop-4.5.2
---
.../patches/10-only-build-unpacked.patch | 7 ++++
.../patches/20-create-desktop-file.patch | 17 +++++++++
.../patches/30-allow-build-as-root.patch | 4 +++
srcpkgs/mattermost-desktop/template | 36 +++++++++++++++++++
4 files changed, 64 insertions(+)
create mode 100644 srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
create mode 100644 srcpkgs/mattermost-desktop/template
diff --git a/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
new file mode 100644
index 00000000000..7cbf34356a3
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
@@ -0,0 +1,7 @@
+--- electron-builder.json.orig 2020-07-25 12:41:25.091865817 +0300
++++ electron-builder.json 2020-07-25 12:41:41.889843654 +0300
+@@ -38,3 +38 @@
+- "deb",
+- "tar.gz",
+- "appimage"
++ "dir"
diff --git a/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
new file mode 100644
index 00000000000..8cb468d77b9
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
@@ -0,0 +1,17 @@
+--- electron-builder.json.orig 2020-07-25 12:46:12.470489136 +0300
++++ electron-builder.json 2020-07-25 12:47:22.490397616 +0300
+@@ -52 +52,2 @@
+- "README.md"
++ "README.md",
++ "Mattermost.desktop"
+--- resources/linux/Mattermost.desktop.orig 1970-01-01 03:00:00.000000000 +0300
++++ resources/linux/Mattermost.desktop 2020-07-25 12:49:12.938253258 +0300
+@@ -0,0 +1,8 @@
++[Desktop Entry]
++Name=Mattermost
++Comment=Mattermost Desktop application for Linux
++Exec=/usr/bin/mattermost-desktop/mattermost-desktop
++Terminal=false
++Type=Application
++Icon=/usr/libexec/mattermost-desktop/icon.svg
++Categories=Network;InstantMessaging;
diff --git a/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch b/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
new file mode 100644
index 00000000000..f7ad3d4936a
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
@@ -0,0 +1,4 @@
+--- .npmrc.orig 1970-01-01 03:00:00.000000000 +0300
++++ .npmrc 2020-07-25 19:10:22.837221360 +0300
+@@ -0,0 +1 @@
++unsafe-perm = true
diff --git a/srcpkgs/mattermost-desktop/template b/srcpkgs/mattermost-desktop/template
new file mode 100644
index 00000000000..4c6ad67f1bb
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/template
@@ -0,0 +1,36 @@
+# Template file for 'mattermost-desktop'
+pkgname=mattermost-desktop
+version=4.5.2
+revision=1
+archs="x86_64 i686" # no musl due to electron
+wrksrc="desktop-${version}"
+# electron-builder needs GNU tar
+hostmakedepends="git nodejs-lts-10 python libicns GraphicsMagick xz tar"
+short_desc="Team messaging app, an open source Slack alternative"
+maintainer="Artem Zhurikhin <ashpool@xecut.net>"
+license="Apache-2.0"
+homepage="https://mattermost.com/"
+distfiles="https://github.com/mattermost/desktop/archive/v${version}.tar.gz"
+checksum=17e32346592d175f091a4f12068e0cfc5cfd20ed7894f88bb5b54b2eb6eac74a
+
+pre_build() {
+ npm install
+}
+
+do_build() {
+ npm run build
+ npm run package:linux
+}
+
+do_install() {
+ case $XBPS_TARGET_MACHINE in
+ x86_64) cd release/linux-unpacked ;;
+ i686) cd release/linux-ia32-unpacked ;;
+ *) false ;;
+ esac
+ vmkdir usr/libexec/${pkgname}
+ vcopy . usr/libexec/${pkgname}
+ vinstall Mattermost.desktop 644 usr/share/applications
+ vmkdir usr/bin
+ ln -s ../libexec/mattermost-desktop ${DESTDIR}/usr/bin/mattermost-desktop
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (9 preceding siblings ...)
2020-07-25 16:23 ` [PR PATCH] [Updated] " ashpooljh
@ 2020-07-25 16:32 ` ashpooljh
2020-07-25 16:46 ` ashpooljh
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 16:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 504 bytes --]
New comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#issuecomment-663874573
Comment:
Apparently, the issue was connected to the fact that Travis runs builds (or `npm`, at least) as root. By default, `npm` refuses to run as root, so I had to create a patch for `.npmrc` allowing that. Feels like a silly thing to do just to please the CI, and I would love to learn of a better way to circumvent this and make Travis run it as an unprivileged user.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (10 preceding siblings ...)
2020-07-25 16:32 ` ashpooljh
@ 2020-07-25 16:46 ` ashpooljh
2020-07-25 17:01 ` [PR PATCH] [Updated] " ashpooljh
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 16:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
New comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#issuecomment-663874573
Comment:
Apparently, the issue was connected to the fact that Travis runs builds (or `npm`, at least) as root. By default, `npm` refuses to run as root, so I had to create a patch for `.npmrc` allowing that. Feels like a silly thing to do just to please the CI, and I would love to learn of a better way to circumvent this and make Travis run it as an unprivileged user.
With the latest revision, I added the support for `i686` arch as well.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (11 preceding siblings ...)
2020-07-25 16:46 ` ashpooljh
@ 2020-07-25 17:01 ` ashpooljh
2020-07-25 17:02 ` ashpooljh
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 17:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
There is an updated pull request by ashpooljh against master on the void-packages repository
https://github.com/ashpooljh/void-packages mattermost-desktop
https://github.com/void-linux/void-packages/pull/23827
New package: mattermost-desktop-4.5.2
OK, I know this is yet another Electron monstrosity [nobody ever asked for](https://github.com/void-linux/void-packages/issues?q=mattermost), but there are actually people out there using it. Believe it or not, I personally find it slightly less annoying than Slack. Even Stallman [recommends](https://stallman.org/slack.html) it!
By the way, this is my first attempt both at creating a Void package AND at building and packaging an Electron application, so it's probably a mess. I'm looking forward to receiving comments and remarks.
A patch file from https://github.com/void-linux/void-packages/pull/23827.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mattermost-desktop-23827.patch --]
[-- Type: text/x-diff, Size: 4025 bytes --]
From 1c202cfe56de6ed1f83b0fac3226c0eda98e62ae Mon Sep 17 00:00:00 2001
From: Artem Zhurikhin <ashpool@xecut.net>
Date: Sat, 25 Jul 2020 19:19:26 +0300
Subject: [PATCH] New package: mattermost-desktop-4.5.2
---
.../patches/10-only-build-unpacked.patch | 7 ++++
.../patches/20-create-desktop-file.patch | 17 +++++++++
.../patches/30-allow-build-as-root.patch | 4 ++
srcpkgs/mattermost-desktop/template | 37 +++++++++++++++++++
4 files changed, 65 insertions(+)
create mode 100644 srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
create mode 100644 srcpkgs/mattermost-desktop/template
diff --git a/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
new file mode 100644
index 00000000000..7cbf34356a3
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
@@ -0,0 +1,7 @@
+--- electron-builder.json.orig 2020-07-25 12:41:25.091865817 +0300
++++ electron-builder.json 2020-07-25 12:41:41.889843654 +0300
+@@ -38,3 +38 @@
+- "deb",
+- "tar.gz",
+- "appimage"
++ "dir"
diff --git a/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
new file mode 100644
index 00000000000..8cb468d77b9
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
@@ -0,0 +1,17 @@
+--- electron-builder.json.orig 2020-07-25 12:46:12.470489136 +0300
++++ electron-builder.json 2020-07-25 12:47:22.490397616 +0300
+@@ -52 +52,2 @@
+- "README.md"
++ "README.md",
++ "Mattermost.desktop"
+--- resources/linux/Mattermost.desktop.orig 1970-01-01 03:00:00.000000000 +0300
++++ resources/linux/Mattermost.desktop 2020-07-25 12:49:12.938253258 +0300
+@@ -0,0 +1,8 @@
++[Desktop Entry]
++Name=Mattermost
++Comment=Mattermost Desktop application for Linux
++Exec=/usr/bin/mattermost-desktop/mattermost-desktop
++Terminal=false
++Type=Application
++Icon=/usr/libexec/mattermost-desktop/icon.svg
++Categories=Network;InstantMessaging;
diff --git a/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch b/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
new file mode 100644
index 00000000000..f7ad3d4936a
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
@@ -0,0 +1,4 @@
+--- .npmrc.orig 1970-01-01 03:00:00.000000000 +0300
++++ .npmrc 2020-07-25 19:10:22.837221360 +0300
+@@ -0,0 +1 @@
++unsafe-perm = true
diff --git a/srcpkgs/mattermost-desktop/template b/srcpkgs/mattermost-desktop/template
new file mode 100644
index 00000000000..2393f2376e8
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/template
@@ -0,0 +1,37 @@
+# Template file for 'mattermost-desktop'
+pkgname=mattermost-desktop
+version=4.5.2
+revision=1
+archs="x86_64 i686" # no musl due to electron
+wrksrc="desktop-${version}"
+# electron-builder needs GNU tar
+hostmakedepends="git nodejs-lts-10 python libicns GraphicsMagick xz tar"
+makedepends="libnotify-devel"
+short_desc="Team messaging app, an open source Slack alternative"
+maintainer="Artem Zhurikhin <ashpool@xecut.net>"
+license="Apache-2.0"
+homepage="https://mattermost.com/"
+distfiles="https://github.com/mattermost/desktop/archive/v${version}.tar.gz"
+checksum=17e32346592d175f091a4f12068e0cfc5cfd20ed7894f88bb5b54b2eb6eac74a
+
+pre_build() {
+ npm install
+}
+
+do_build() {
+ npm run build
+ npm run package:linux
+}
+
+do_install() {
+ case $XBPS_TARGET_MACHINE in
+ x86_64) cd release/linux-unpacked ;;
+ i686) cd release/linux-ia32-unpacked ;;
+ *) false ;;
+ esac
+ vmkdir usr/libexec/${pkgname}
+ vcopy . usr/libexec/${pkgname}
+ vinstall Mattermost.desktop 644 usr/share/applications
+ vmkdir usr/bin
+ ln -s ../libexec/mattermost-desktop ${DESTDIR}/usr/bin/mattermost-desktop
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (12 preceding siblings ...)
2020-07-25 17:01 ` [PR PATCH] [Updated] " ashpooljh
@ 2020-07-25 17:02 ` ashpooljh
2020-07-26 11:24 ` [PR REVIEW] " pullmoll
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-25 17:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
New comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#issuecomment-663877741
Comment:
Enabled the support for notifications by adding `libnotify-devel` to `makedepends`.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (13 preceding siblings ...)
2020-07-25 17:02 ` ashpooljh
@ 2020-07-26 11:24 ` pullmoll
2020-07-26 11:25 ` pullmoll
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pullmoll @ 2020-07-26 11:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
New review comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460514694
Comment:
Remove that line as it is not a package constraint but dependency issue.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (14 preceding siblings ...)
2020-07-26 11:24 ` [PR REVIEW] " pullmoll
@ 2020-07-26 11:25 ` pullmoll
2020-07-26 11:38 ` [PR PATCH] [Updated] " ashpooljh
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pullmoll @ 2020-07-26 11:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
New review comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460514836
Comment:
No need for that line as builds for other targets will fail anyway.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (15 preceding siblings ...)
2020-07-26 11:25 ` pullmoll
@ 2020-07-26 11:38 ` ashpooljh
2020-07-26 12:07 ` [PR REVIEW] " ashpooljh
2020-07-26 13:49 ` [PR PATCH] [Merged]: " pullmoll
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-26 11:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
There is an updated pull request by ashpooljh against master on the void-packages repository
https://github.com/ashpooljh/void-packages mattermost-desktop
https://github.com/void-linux/void-packages/pull/23827
New package: mattermost-desktop-4.5.2
OK, I know this is yet another Electron monstrosity [nobody ever asked for](https://github.com/void-linux/void-packages/issues?q=mattermost), but there are actually people out there using it. Believe it or not, I personally find it slightly less annoying than Slack. Even Stallman [recommends](https://stallman.org/slack.html) it!
By the way, this is my first attempt both at creating a Void package AND at building and packaging an Electron application, so it's probably a mess. I'm looking forward to receiving comments and remarks.
A patch file from https://github.com/void-linux/void-packages/pull/23827.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mattermost-desktop-23827.patch --]
[-- Type: text/x-diff, Size: 3984 bytes --]
From c345209408fa24bebb000373bb0dfa5b3d836ed1 Mon Sep 17 00:00:00 2001
From: Artem Zhurikhin <ashpool@xecut.net>
Date: Sat, 25 Jul 2020 19:19:26 +0300
Subject: [PATCH] New package: mattermost-desktop-4.5.2
---
.../patches/10-only-build-unpacked.patch | 7 ++++
.../patches/20-create-desktop-file.patch | 17 +++++++++
.../patches/30-allow-build-as-root.patch | 4 +++
srcpkgs/mattermost-desktop/template | 36 +++++++++++++++++++
4 files changed, 64 insertions(+)
create mode 100644 srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
create mode 100644 srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
create mode 100644 srcpkgs/mattermost-desktop/template
diff --git a/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
new file mode 100644
index 00000000000..7cbf34356a3
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/10-only-build-unpacked.patch
@@ -0,0 +1,7 @@
+--- electron-builder.json.orig 2020-07-25 12:41:25.091865817 +0300
++++ electron-builder.json 2020-07-25 12:41:41.889843654 +0300
+@@ -38,3 +38 @@
+- "deb",
+- "tar.gz",
+- "appimage"
++ "dir"
diff --git a/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
new file mode 100644
index 00000000000..8cb468d77b9
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/20-create-desktop-file.patch
@@ -0,0 +1,17 @@
+--- electron-builder.json.orig 2020-07-25 12:46:12.470489136 +0300
++++ electron-builder.json 2020-07-25 12:47:22.490397616 +0300
+@@ -52 +52,2 @@
+- "README.md"
++ "README.md",
++ "Mattermost.desktop"
+--- resources/linux/Mattermost.desktop.orig 1970-01-01 03:00:00.000000000 +0300
++++ resources/linux/Mattermost.desktop 2020-07-25 12:49:12.938253258 +0300
+@@ -0,0 +1,8 @@
++[Desktop Entry]
++Name=Mattermost
++Comment=Mattermost Desktop application for Linux
++Exec=/usr/bin/mattermost-desktop/mattermost-desktop
++Terminal=false
++Type=Application
++Icon=/usr/libexec/mattermost-desktop/icon.svg
++Categories=Network;InstantMessaging;
diff --git a/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch b/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
new file mode 100644
index 00000000000..f7ad3d4936a
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/patches/30-allow-build-as-root.patch
@@ -0,0 +1,4 @@
+--- .npmrc.orig 1970-01-01 03:00:00.000000000 +0300
++++ .npmrc 2020-07-25 19:10:22.837221360 +0300
+@@ -0,0 +1 @@
++unsafe-perm = true
diff --git a/srcpkgs/mattermost-desktop/template b/srcpkgs/mattermost-desktop/template
new file mode 100644
index 00000000000..9bb3d8dc95f
--- /dev/null
+++ b/srcpkgs/mattermost-desktop/template
@@ -0,0 +1,36 @@
+# Template file for 'mattermost-desktop'
+pkgname=mattermost-desktop
+version=4.5.2
+revision=1
+archs="x86_64 i686"
+wrksrc="desktop-${version}"
+# electron-builder needs GNU tar
+hostmakedepends="git nodejs-lts-10 python libicns GraphicsMagick xz tar"
+makedepends="libnotify-devel"
+short_desc="Team messaging app, an open source Slack alternative"
+maintainer="Artem Zhurikhin <ashpool@xecut.net>"
+license="Apache-2.0"
+homepage="https://mattermost.com/"
+distfiles="https://github.com/mattermost/desktop/archive/v${version}.tar.gz"
+checksum=17e32346592d175f091a4f12068e0cfc5cfd20ed7894f88bb5b54b2eb6eac74a
+
+pre_build() {
+ npm install
+}
+
+do_build() {
+ npm run build
+ npm run package:linux
+}
+
+do_install() {
+ case $XBPS_TARGET_MACHINE in
+ x86_64) cd release/linux-unpacked ;;
+ i686) cd release/linux-ia32-unpacked ;;
+ esac
+ vmkdir usr/libexec/${pkgname}
+ vcopy . usr/libexec/${pkgname}
+ vinstall Mattermost.desktop 644 usr/share/applications
+ vmkdir usr/bin
+ ln -s ../libexec/mattermost-desktop ${DESTDIR}/usr/bin/mattermost-desktop
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR REVIEW] New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (16 preceding siblings ...)
2020-07-26 11:38 ` [PR PATCH] [Updated] " ashpooljh
@ 2020-07-26 12:07 ` ashpooljh
2020-07-26 13:49 ` [PR PATCH] [Merged]: " pullmoll
18 siblings, 0 replies; 20+ messages in thread
From: ashpooljh @ 2020-07-26 12:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
New review comment by ashpooljh on void-packages repository
https://github.com/void-linux/void-packages/pull/23827#discussion_r460519299
Comment:
I removed the comment, although one could argue that since Electron is an 'implicit' dependency (i.e. not listed in any of the `*depends`, but downloaded during `do_build`), the reason behind the restriction wouldn't be immediately clear.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Merged]: New package: mattermost-desktop-4.5.2
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
` (17 preceding siblings ...)
2020-07-26 12:07 ` [PR REVIEW] " ashpooljh
@ 2020-07-26 13:49 ` pullmoll
18 siblings, 0 replies; 20+ messages in thread
From: pullmoll @ 2020-07-26 13:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
There's a merged pull request on the void-packages repository
New package: mattermost-desktop-4.5.2
https://github.com/void-linux/void-packages/pull/23827
Description:
OK, I know this is yet another Electron monstrosity [nobody ever asked for](https://github.com/void-linux/void-packages/issues?q=mattermost), but there are actually people out there using it. Believe it or not, I personally find it slightly less annoying than Slack. Even Stallman [recommends](https://stallman.org/slack.html) it!
By the way, this is my first attempt both at creating a Void package AND at building and packaging an Electron application, so it's probably a mess. I'm looking forward to receiving comments and remarks.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2020-07-26 13:49 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 10:43 [PR PATCH] New package: mattermost-desktop-4.5.2 ashpooljh
2020-07-25 10:55 ` [PR REVIEW] " pullmoll
2020-07-25 10:58 ` pullmoll
2020-07-25 11:04 ` ashpooljh
2020-07-25 11:07 ` ashpooljh
2020-07-25 11:08 ` pullmoll
2020-07-25 11:09 ` pullmoll
2020-07-25 11:09 ` ashpooljh
2020-07-25 11:56 ` [PR PATCH] [Updated] " ashpooljh
2020-07-25 12:14 ` ashpooljh
2020-07-25 16:23 ` [PR PATCH] [Updated] " ashpooljh
2020-07-25 16:32 ` ashpooljh
2020-07-25 16:46 ` ashpooljh
2020-07-25 17:01 ` [PR PATCH] [Updated] " ashpooljh
2020-07-25 17:02 ` ashpooljh
2020-07-26 11:24 ` [PR REVIEW] " pullmoll
2020-07-26 11:25 ` pullmoll
2020-07-26 11:38 ` [PR PATCH] [Updated] " ashpooljh
2020-07-26 12:07 ` [PR REVIEW] " ashpooljh
2020-07-26 13:49 ` [PR PATCH] [Merged]: " pullmoll
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).