-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a69f3c0
commit 1ccaaf6
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Template file for 'cinny-desktop' | ||
pkgname=cinny-desktop | ||
version=3.0.0 | ||
revision=1 | ||
# used for the cargo environment config | ||
build_style=cargo | ||
hostmakedepends="cargo-tauri nodejs pkg-config" | ||
makedepends="dbus-devel gtk+3-devel libayatana-appindicator-devel libsoup-devel openssl-devel webkit2gtk-devel" | ||
depends="libayatana-appindicator" | ||
short_desc="Yet another matrix client for desktop" | ||
maintainer="Marcin Puc <tranzystorek.io@protonmail.com>" | ||
license="AGPL-3.0-or-later" | ||
homepage="https://cinny.in/" | ||
changelog="https://github.com/cinnyapp/cinny/releases" | ||
distfiles="https://github.com/cinnyapp/cinny-desktop/releases/download/v${version}/cinny-desktop-v${version}.zip" | ||
checksum=a6d5c1ea56df4fc7570006d820f9bed6d8a77753e56fb60025b26b95a89e7db4 | ||
|
||
do_build() { | ||
( | ||
cd cinny | ||
npm ci | ||
) | ||
|
||
cat > cargo-auditable <<'_EOF' | ||
#!/bin/sh | ||
exec cargo auditable --locked "$@" | ||
_EOF | ||
chmod +x cargo-auditable | ||
|
||
export NODE_OPTIONS=--max_old_space_size=6144 | ||
cargo tauri build --target ${RUST_TARGET} --runner ${PWD}/cargo-auditable --bundles deb | ||
} | ||
|
||
do_check() { | ||
cd src-tauri | ||
cargo auditable test --release --locked --target ${RUST_TARGET} | ||
} | ||
|
||
do_install() { | ||
local _deb_arch | ||
case "${XBPS_TARGET_MACHINE}" in | ||
x86_64*) _deb_arch=amd64 ;; | ||
i686*) _deb_arch=i386 ;; | ||
aarch64*) _deb_arch=arm64 ;; | ||
armv*) _deb_arch=armhf ;; | ||
esac | ||
|
||
vbin src-tauri/target/${RUST_TARGET}/release/cinny | ||
vcopy src-tauri/target/${RUST_TARGET}/release/bundle/deb/cinny_${version}_${_deb_arch}/data/usr/share usr/share | ||
vlicense LICENSE | ||
} |