From bf42efe25ee3837e08c3950918b0abe1a824f52e Mon Sep 17 00:00:00 2001 From: projectmoon Date: Tue, 5 May 2020 21:14:34 +0000 Subject: [PATCH] riot-desktop: update to 1.6.0. --- srcpkgs/riot-desktop/template | 52 ++++++++++++++--------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/srcpkgs/riot-desktop/template b/srcpkgs/riot-desktop/template index 0b68ebbff5a..7320e0d9158 100644 --- a/srcpkgs/riot-desktop/template +++ b/srcpkgs/riot-desktop/template @@ -1,18 +1,18 @@ # Template file for 'riot-desktop' pkgname=riot-desktop -version=1.5.15 +version=1.6.0 revision=1 archs="i686 x86_64" -wrksrc="riot-web-${version}" +wrksrc="riot-desktop-${version}" conf_files="/etc/${pkgname}/config.json" -hostmakedepends="git yarn nodejs rust cargo python sqlcipher-devel curl" +hostmakedepends="git yarn nodejs rust cargo python sqlcipher-devel curl tar gnupg" depends="c-ares ffmpeg gtk+3 http-parser libevent libxslt minizip nss re2 snappy" short_desc="Glossy Matrix collaboration client, desktop version" -maintainer="Orphaned " +maintainer="projectmoon " license="Apache-2.0" homepage="https://riot.im" -distfiles="https://github.com/vector-im/riot-web/archive/v${version}.tar.gz" -checksum="3d5512f842fa436aef00b1b1f1c5ced4a4f1adc5cc1bcfddbc77573387f9cc42" +distfiles="https://github.com/vector-im/riot-desktop/archive/v${version}.tar.gz" +checksum="4b1befbabb1fc391d0a9a49125540903fa97d5bbad033bdaff377a018a244333" nocross=yes nostrip=yes shlib_provides="libGLVESv2.so" @@ -22,44 +22,32 @@ case "$XBPS_TARGET_MACHINE" in esac pre_build() { - # This section is borrowed from the Arch PKGBUILD - sed -i 's@https://riot.im/download/desktop/update/@null@g' electron_app/riot.im/config.json + # Disable auto-updating. + sed -i 's@https://packages.riot.im/desktop/update/@null@g' riot.im/release/config.json sed -i 's/"target": "deb"/"target": "dir"/g' package.json yarn install - - # Add the matrix-seshat package (which is needed for search in E2E encrypted - # rooms) as well as the electron-build-env package, which gets used later to - # rebuild the native libraries against electron’s version of node. - # See here for more information: - # https://github.com/vector-im/riot-web/blob/develop/docs/native-node-modules.md#adding-seshat-for-search-in-e2e-encrypted-rooms - cd electron_app - yarn add matrix-seshat - yarn add electron-build-env - # Finally also enable the event indexing feature in the config. - sed -i 's/"features": {/"features": {\n "feature_event_indexing": "enable",/' riot.im/config.json + yarn run fetch --importkey + yarn run fetch --cfgdir 'riot.im/release/' "v${version}" } do_build() { - # This is also borrowed from the Arch PKGBUILD - cd electron_app - # Recompile matrix-seshat - yarn run electron-build-env -- --electron 7 neon build matrix-seshat --release - cd .. - # Do the actual build - yarn build:electron:linux + yarn run build:native + yarn run build } do_install() { vmkdir usr/lib/riot-desktop vmkdir etc/riot-desktop - vcopy electron_app/dist/linux-unpacked/* /usr/lib/riot-desktop - vinstall config.sample.json 664 /etc/riot-desktop/ config.json - ln -s /etc/riot-desktop/config.json $DESTDIR/usr/lib/riot-desktop/resources/webapp + vcopy dist/linux-unpacked/* /usr/lib/riot-desktop + # not sure this actually does anything at the moment. + # it seems the build packs the config directly. + vinstall riot.im/release/config.json 664 /etc/riot-desktop/ config.json + #ln -s /etc/riot-desktop/config.json $DESTDIR/usr/lib/riot-desktop/resources/webapp vmkdir usr/bin - ln -s /usr/lib/riot-desktop/riot-web $DESTDIR/usr/bin/riot-desktop + ln -s /usr/lib/riot-desktop/riot-desktop $DESTDIR/usr/bin/riot-desktop vinstall ${FILESDIR}/riot-desktop.desktop 644 /usr/share/applications/ riot-desktop.desktop - vinstall res/themes/riot/img/logos/riot-im-logo.svg 644 /usr/share/icons/hicolor/scalable/apps/ riot.svg + vinstall deploys/riot-v${version}/themes/riot/img/logos/riot-im-logo.svg 644 /usr/share/icons/hicolor/scalable/apps/ riot.svg for i in 16 24 48 64 96 128 256 512; do - vinstall electron_app/build/icons/${i}x${i}.png 644 /usr/share/icons/hicolor/${i}x${i}/apps/ riot.png + vinstall build/icons/${i}x${i}.png 644 /usr/share/icons/hicolor/${i}x${i}/apps/ riot.png done }