|
| 1 | +# Template file for 'zeditor' |
| 2 | +pkgname=zeditor |
| 3 | +version=0.230.2 |
| 4 | +revision=1 |
| 5 | +archs="x86_64 aarch64" |
| 6 | +build_style=cargo |
| 7 | +make_build_args="--package cli --package zed --package remote_server" |
| 8 | +make_check_args="--workspace" |
| 9 | +hostmakedepends="pkg-config cmake clang gettext" |
| 10 | +makedepends="gettext-devel elfutils-devel alsa-lib-devel fontconfig-devel glib-devel libva-devel libxcb-devel libxkbcommon-devel libzstd-devel openssl-devel wayland-devel vulkan-loader sqlite-devel libX11-devel libgit2-1.9-devel" |
| 11 | +short_desc="High-performance multiplayer code editor" |
| 12 | +maintainer="JudahJL < [email protected]>" |
| 13 | +license="GPL-3.0-or-later" |
| 14 | +homepage="https://zed.dev/" |
| 15 | +distfiles="https://github.com/zed-industries/zed/archive/refs/tags/v${version}.tar.gz" |
| 16 | +checksum=b4be9f02fa1621e8bf18a628ac0a8c7e220272ec1060ce184ff7e6b80cf1eae4 |
| 17 | + |
| 18 | +pre_build() { |
| 19 | + echo -n stable > crates/zed/RELEASE_CHANNEL |
| 20 | + export RELEASE_VERSION="${version}" |
| 21 | + export ZED_UPDATE_EXPLANATION="Please use 'xbps-install -S zeditor' to update." |
| 22 | + export ZED_BUNDLE=true |
| 23 | +} |
| 24 | + |
| 25 | +do_install() { |
| 26 | + local app_id="dev.zed.Zed" |
| 27 | + |
| 28 | + vbin "target/${RUST_TARGET}/release/cli" zed |
| 29 | + vinstall "target/${RUST_TARGET}/release/zed" 755 usr/libexec zed-editor |
| 30 | + vinstall "target/${RUST_TARGET}/release/remote_server" 755 usr/libexec zed-remote-server |
| 31 | + |
| 32 | + export APP_NAME="Zed" |
| 33 | + export APP_CLI="zed" |
| 34 | + export APP_ICON="zed" # This refers to the icon filename without extension |
| 35 | + export APP_ARGS="%U" |
| 36 | + export DO_STARTUP_NOTIFY="true" |
| 37 | + |
| 38 | + envsubst < "crates/zed/resources/zed.desktop.in" > "${app_id}.desktop" |
| 39 | + vinstall "${app_id}.desktop" 644 usr/share/applications |
| 40 | + |
| 41 | + vinstall "crates/zed/resources/app-icon.png" 644 usr/share/icons/hicolor/512x512/apps zed.png |
| 42 | + vinstall "crates/zed/resources/ [email protected]" 644 usr/share/icons/hicolor/1024x1024/apps zed.png |
| 43 | +} |
0 commit comments