# Template file for 'riot-desktop' pkgname=riot-desktop version=1.6.3 revision=1 archs="i686 x86_64" wrksrc="riot-web-${version}" conf_files="/etc/${pkgname}/config.json" hostmakedepends="git yarn nodejs rust cargo python sqlcipher-devel curl libappindicator-devel libnotify-devel" depends="c-ares ffmpeg gtk+3 http-parser libevent libxslt minizip nss re2 snappy sqlcipher" short_desc="Glossy Matrix collaboration client, desktop version" maintainer="projectmoon " license="Apache-2.0" homepage="https://riot.im" distfiles="https://github.com/vector-im/riot-desktop/archive/v${version}.tar.gz>riot-desktop.tar.gz https://github.com/vector-im/riot-web/archive/v${version}.tar.gz>riot-web.tar.gz" checksum="2661db8e9e39f87e92ea37caeb9a96bb7c5bdea04ecb6db1bb096b913d80a5b8 0334051674f11f05d0cc0bbc36424f9459a61a9f6cebea75c57b5c86c2d803db" nocross=yes nostrip=yes case "$XBPS_TARGET_MACHINE" in i686*) broken="/void-packages/srcpkgs/riot-desktop/template: line 20: 390 Segmentation fault" ;; esac pre_build() { # Build dependencies for riot-web yarn install # Build dependencies and alterations for riot-desktop cd ../riot-desktop-${version} # 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 } do_build() { yarn build cd ../riot-desktop-${version} yarn run build:native yarn run build } do_install() { vmkdir usr/lib/riot-desktop vmkdir etc/riot-desktop vcopy ../riot-desktop-${version}/dist/linux-unpacked/* /usr/lib/riot-desktop vinstall config.sample.json 644 /etc/riot-desktop/ config.json vcopy webapp /usr/lib/riot-desktop/resources ln -s /etc/riot-desktop/config.json $DESTDIR/usr/lib/riot-desktop/resources/webapp/config.json vmkdir usr/bin 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 webapp/themes/riot/img/logos/riot-logo.svg 644 /usr/share/icons/hicolor/scalable/apps/ riot.svg for i in 16 24 48 64 96 128 256 512; do vinstall ../riot-desktop-${version}/build/icons/${i}x${i}.png 644 /usr/share/icons/hicolor/${i}x${i}/apps/ riot.png done }