Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: element-web-1.11.8 (and move element/riot-desktop as subpackages)
@ 2022-09-30 21:17 TinfoilSubmarine
  2022-09-30 23:02 ` TinfoilSubmarine
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: TinfoilSubmarine @ 2022-09-30 21:17 UTC (permalink / raw)
  To: ml

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

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

https://github.com/TinfoilSubmarine/void-packages update/element
https://github.com/void-linux/void-packages/pull/39554

New package: element-web-1.11.8 (and move element/riot-desktop as subpackages)
Move element-desktop, riot-desktop to subpackage of element-web

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- 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
-->

I've had `element-desktop` installed on my server and just pointing reverse proxy at `/usr/lib/element-desktop/resources/webapp`, but I also had to `ignorepkg` all of the dependencies. This fixes that :)

I didn't bump the revision since there aren't any functional changes to `element-desktop`, but I can if needed.

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

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

From ead317a2ac658f2944a08c70f7da619c203a4b4b Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Fri, 30 Sep 2022 16:43:15 -0400
Subject: [PATCH] New package: element-web-1.11.8

Move element-desktop, riot-desktop to subpackage of element-web
---
 srcpkgs/element-desktop                       |  1 +
 .../files/element-desktop                     |  0
 .../files/element-desktop.desktop             |  0
 ...web_0001-remove-dependency-on-sentry.patch |  0
 ...001-remove-dependency-on-sentry.patch.args |  0
 .../{element-desktop => element-web}/template | 80 +++++++++++--------
 srcpkgs/riot-desktop                          |  2 +-
 7 files changed, 49 insertions(+), 34 deletions(-)
 create mode 120000 srcpkgs/element-desktop
 rename srcpkgs/{element-desktop => element-web}/files/element-desktop (100%)
 rename srcpkgs/{element-desktop => element-web}/files/element-desktop.desktop (100%)
 rename srcpkgs/{element-desktop => element-web}/patches/element-web_0001-remove-dependency-on-sentry.patch (100%)
 rename srcpkgs/{element-desktop => element-web}/patches/element-web_0001-remove-dependency-on-sentry.patch.args (100%)
 rename srcpkgs/{element-desktop => element-web}/template (52%)

diff --git a/srcpkgs/element-desktop b/srcpkgs/element-desktop
new file mode 120000
index 000000000000..ec33e3fca227
--- /dev/null
+++ b/srcpkgs/element-desktop
@@ -0,0 +1 @@
+element-web
\ No newline at end of file
diff --git a/srcpkgs/element-desktop/files/element-desktop b/srcpkgs/element-web/files/element-desktop
similarity index 100%
rename from srcpkgs/element-desktop/files/element-desktop
rename to srcpkgs/element-web/files/element-desktop
diff --git a/srcpkgs/element-desktop/files/element-desktop.desktop b/srcpkgs/element-web/files/element-desktop.desktop
similarity index 100%
rename from srcpkgs/element-desktop/files/element-desktop.desktop
rename to srcpkgs/element-web/files/element-desktop.desktop
diff --git a/srcpkgs/element-desktop/patches/element-web_0001-remove-dependency-on-sentry.patch b/srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch
similarity index 100%
rename from srcpkgs/element-desktop/patches/element-web_0001-remove-dependency-on-sentry.patch
rename to srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch
diff --git a/srcpkgs/element-desktop/patches/element-web_0001-remove-dependency-on-sentry.patch.args b/srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch.args
similarity index 100%
rename from srcpkgs/element-desktop/patches/element-web_0001-remove-dependency-on-sentry.patch.args
rename to srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch.args
diff --git a/srcpkgs/element-desktop/template b/srcpkgs/element-web/template
similarity index 52%
rename from srcpkgs/element-desktop/template
rename to srcpkgs/element-web/template
index 0231586c65f7..61b969545d1b 100644
--- a/srcpkgs/element-desktop/template
+++ b/srcpkgs/element-web/template
@@ -1,16 +1,14 @@
-# Template file for 'element-desktop'
-pkgname=element-desktop
+# Template file for 'element-web'
+pkgname=element-web
 version=1.11.8
 revision=1
 create_wrksrc=yes
-conf_files="/etc/${pkgname}/config.json"
+conf_files="/etc/webapps/element/config.json"
 hostmakedepends="git yarn nodejs rust cargo python3 curl
  sqlcipher-devel libappindicator-devel libnotify-devel pkg-config
  app-builder jq moreutils"
 makedepends="libsecret-devel"
-depends="c-ares ffmpeg gtk+3 http-parser libevent
- libxslt minizip nss re2 snappy sqlcipher electron19"
-short_desc="Glossy Matrix collaboration client, desktop version"
+short_desc="Glossy Matrix collaboration client - web version"
 maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="Apache-2.0"
 homepage="https://element.io"
@@ -23,25 +21,25 @@ checksum="541c01fdac38db2a4e7c058be5d2196ace0cd987c37f58a79631ec43c260182f
 export USE_SYSTEM_APP_BUILDER=true
 
 post_extract() {
+	mv ${pkgname/web/desktop}-${version} ${pkgname/web/desktop}
 	mv ${pkgname}-${version} ${pkgname}
-	mv ${pkgname/desktop/web}-${version} ${pkgname/desktop/web}
 }
 
 pre_patch() {
+	for patch in ${pkgname/web/desktop}_*.patch; do
+		ln -s ../${patch} ${pkgname/web/desktop}
+	done
 	for patch in ${pkgname}_*.patch; do
 		ln -s ../${patch} ${pkgname}
 	done
-	for patch in ${pkgname/desktop/web}_*.patch; do
-		ln -s ../${patch} ${pkgname/desktop/web}
-	done
 }
 
 post_patch() {
-	cd ${pkgname/desktop/web}
+	cd ${pkgname}
 	# Disable auto-updating
 	jq '.update_base_url = ""' element.io/app/config.json | sponge element.io/app/config.json
 
-	cd ../${pkgname}
+	cd ../${pkgname/web/desktop}
 	vsed -i 's/"target": "deb"/"target": "dir"/g' package.json
 }
 
@@ -54,20 +52,20 @@ pre_build() {
 		i686*) carch=ia32 ;;
 	esac
 
-	cd ${pkgname/desktop/web}
+	cd ${pkgname}
 
 	# Build dependencies for element-web
 	npm_config_arch=$carch yarn install
 
 	# Build dependencies and alterations for element-desktop
-	cd ../${pkgname}
+	cd ../${pkgname/web/desktop}
 	npm_config_arch=$carch yarn install
 }
 
 do_build() {
-	cd ${pkgname/desktop/web}
+	cd ${pkgname}
 	yarn build
-	cd ../${pkgname}
+	cd ../${pkgname/web/desktop}
 	if [ "$CROSS_BUILD" ]; then
 		yarn run build:native --target ${XBPS_CROSS_RUST_TARGET}
 	else
@@ -84,25 +82,41 @@ do_build() {
 }
 
 do_install() {
-	cd ${pkgname/desktop/web}
-	vmkdir usr/lib/element-desktop
-	vmkdir etc/element-desktop
-	case "$XBPS_TARGET_MACHINE" in
-		i686*) vcopy ../element-desktop/dist/linux-ia32-unpacked/resources /usr/lib/element-desktop/resources;;
-		*) vcopy ../element-desktop/dist/linux-unpacked/resources /usr/lib/element-desktop/resources
-	esac
-	vinstall config.sample.json 644 /etc/element-desktop/ config.json
-	vcopy webapp /usr/lib/element-desktop/resources
-	ln -s /etc/element-desktop/config.json $DESTDIR/usr/lib/element-desktop/resources/webapp/config.json
+	cd element-web
+	vmkdir usr/share/webapps/element
+	vcopy webapp/. /usr/share/webapps/element
+	vsconf config.sample.json
+	vinstall config.sample.json 644 /etc/webapps/element/ config.json
+	ln -s /etc/webapps/element/config.json $PKGDESTDIR/usr/share/webapps/element/config.json
+}
 
-	vbin ${FILESDIR}/element-desktop
-	ln -s element-desktop $DESTDIR/usr/bin/riot-desktop
-	vinstall ${FILESDIR}/element-desktop.desktop 644 /usr/share/applications/ element-desktop.desktop
-	vinstall webapp/themes/element/img/logos/element-logo.svg 644 /usr/share/icons/hicolor/scalable/apps/ element.svg
+element-desktop_package() {
+	depends+=" c-ares ffmpeg gtk+3 http-parser libevent libxslt
+	 minizip nss re2 snappy sqlcipher electron19"
+	short_desc="${short_desc/web/desktop}"
+	conf_files="/etc/element-desktop/config.json"
+	pkg_install() {
+		cd element-web
+		vmkdir usr/lib/element-desktop
+		vmkdir etc/element-desktop
+		case "$XBPS_TARGET_MACHINE" in
+			i686*) vcopy ../element-desktop/dist/linux-ia32-unpacked/resources /usr/lib/element-desktop/resources;;
+			*) vcopy ../element-desktop/dist/linux-unpacked/resources /usr/lib/element-desktop/resources
+		esac
+		vsconf config.sample.json
+		vinstall config.sample.json 644 /etc/element-desktop/ config.json
+		vcopy webapp /usr/lib/element-desktop/resources
+		ln -s /etc/element-desktop/config.json $PKGDESTDIR/usr/lib/element-desktop/resources/webapp/config.json
 
-	for i in 16 24 48 64 96 128 256 512; do
-		vinstall ../element-desktop/build/icons/${i}x${i}.png 644 /usr/share/icons/hicolor/${i}x${i}/apps/ element.png
-	done
+		vbin ${FILESDIR}/element-desktop
+		ln -s element-desktop $PKGDESTDIR/usr/bin/riot-desktop
+		vinstall ${FILESDIR}/element-desktop.desktop 644 /usr/share/applications/ element-desktop.desktop
+		vinstall webapp/themes/element/img/logos/element-logo.svg 644 /usr/share/icons/hicolor/scalable/apps/ element.svg
+
+		for i in 16 24 48 64 96 128 256 512; do
+			vinstall ../element-desktop/build/icons/${i}x${i}.png 644 /usr/share/icons/hicolor/${i}x${i}/apps/ element.png
+		done
+	}
 }
 
 riot-desktop_package() {
diff --git a/srcpkgs/riot-desktop b/srcpkgs/riot-desktop
index b58491091cde..ec33e3fca227 120000
--- a/srcpkgs/riot-desktop
+++ b/srcpkgs/riot-desktop
@@ -1 +1 @@
-element-desktop
\ No newline at end of file
+element-web
\ No newline at end of file

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

end of thread, other threads:[~2023-01-20 15:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 21:17 [PR PATCH] New package: element-web-1.11.8 (and move element/riot-desktop as subpackages) TinfoilSubmarine
2022-09-30 23:02 ` TinfoilSubmarine
2022-09-30 23:05 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-09-30 23:43 ` New package: element-web-1.11.8 paper42
2022-10-03  1:31 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-10-03  1:33 ` TinfoilSubmarine
2022-10-14 13:00 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-10-27 12:31 ` [PR PATCH] [Updated] New package: element-web-1.11.10 TinfoilSubmarine
2022-11-01 13:28 ` [PR PATCH] [Updated] New package: element-web-1.11.12 TinfoilSubmarine
2023-01-20 15:01 ` [PR PATCH] [Closed]: New package: element-web-1.11.13 TinfoilSubmarine

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