cruxports/wezterm/Pkgfile

36 lines
1.4 KiB
Plaintext

# Description: fancy terminal emulator for xorg and wayland
# URL: https://wezfurlong.org/wezterm/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: rust git fontconfig libxkbcommon hicolor-icon-theme xorg-libx11 xorg-xcb-util xorg-xcb-util-image xorg-xcb-util-keysyms xorg-xcb-util-wm
# Nice to have: wayland
name=wezterm
version=20220905-102802-7d4b8249
release=1
source=(https://github.com/wez/$name/releases/download/$version/$name-$version-src.tar.gz wezterm.lua)
build() {
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
mkdir -p "$PKGMK_SOURCE_DIR/rust"
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
CARGO_OPTS="--release"
prt-get isinst wayland || CARGO_OPTS+=" --no-default-features"
cd $name-$version
cargo build ${CARGO_OPTS}
cd target/release
mkdir -p $PKG/usr/bin
install -Dm 0755 $name $PKG/usr/bin
install -Dm 0755 $name-gui $PKG/usr/bin
install -Dm 0755 $name-mux-server $PKG/usr/bin
install -Dm 0755 strip-ansi-escapes $PKG/usr/bin
cd ../../assets
mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
mkdir -p $PKG/usr/share/applications
install -Dm 0644 icon/terminal.png $PKG/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.$name.png
install -Dm 0644 $name.desktop $PKG/usr/share/applications/org.wezfurlong.$name.desktop
mkdir -p $PKG/etc/xdg/wezterm
install -Dm 0644 $SRC/wezterm.lua $PKG/etc/xdg/wezterm
}