diff options
author | Caleb Maclennan | 2024-03-30 02:15:07 +0300 |
---|---|---|
committer | Caleb Maclennan | 2024-03-30 02:15:07 +0300 |
commit | 049212f43cbcd2e707788e0f36bf27081e02ac02 (patch) | |
tree | 6afa5a57ff7452ad32ec5e54df173b355a175b11 /PKGBUILD | |
download | aur-049212f43cbcd2e707788e0f36bf27081e02ac02.tar.gz |
Initial upload: graphite-editor-git r1409.46a9fc0-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d8059281ecb7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Caleb Maclennan <caleb@alerque.com> + +# The GUI app runs but is not connected to the web backend. The web backend is +# built here and can be accessed, but is meant to be linked into the desktotp +# app not used in a browser. That is apparently blocked on a Tauri bug, so this +# whole thing is known-broken upstream. +# https://github.com/GraphiteEditor/Graphite/issues/584#issuecomment-2027796397 + +pkgname=graphite-editor-git +_pkgname=Graphite +pkgver=r1409.46a9fc0 +pkgrel=1 +pkgdesc='2D raster & vector editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow' +arch=(x86_64) +url="https://github.com/GraphiteEditor/$_pkgname" +license=(Apache-2.0) +depends=(gcc-libs + glibc + gtk3 + openssl) +makedepends=(binaryen + cargo + cargo-about + cargo-tauri + git + libappimage + libsoup + nodejs + npm + rust-wasm + wasm-bindgen + wasm-pack + webkit2gtk) +provides=("${pkgname%-git}=$pkgver") +conflicts=("${pkgname%-git}") +source=("$pkgname::git+$url.git") +sha256sums=('SKIP') + +prepare() { + cd "$pkgname" + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" + pushd frontend + npm install +} + +pkgver() { + cd "$pkgname" + printf "r%s.%s" \ + "$(git rev-list --count HEAD)" \ + "$(git rev-parse --short=7 HEAD)" +} + +_srcenv() { + cd "$pkgname" + export RUSTUP_TOOLCHAIN=stable + unset CARGO_TARGET_DIR + CFLAGS+=' -ffat-lto-objects' + RUSTFLAGS+=' --cfg=web_sys_unstable_apis' +} + +build() { + _srcenv + # pushd frontend + # npm run tauri:build-wasm + # popd + # cargo build --release --frozen + cargo tauri build -b app ||: +} + +check() { + _srcenv +} + +package() { + cd "$pkgname" + install -Dm0755 -t "$pkgdir/usr/bin/" target/release/graphite-{cli,desktop} +} |