Updates the PKGBUILD to improve stability and manage memory consumption during the compilation of large Rust dependencies. This involves adding specific environment variables within the build function to constrain compiler resources, alongside refining package options. - Restrict parallel jobs and set explicit optimization levels for cargo builds - Disable debug symbols in package options
77 lines
2.6 KiB
Bash
77 lines
2.6 KiB
Bash
# Maintainer: Christoph Brandau <c.brandau91@googlemail.com>
|
|
#
|
|
# Local/in-tree PKGBUILD: builds straight from this working directory (no
|
|
# source download, no tauri-bundler/AppImage step) and installs the raw
|
|
# binary + desktop entry. Run `makepkg -si` from the repo root.
|
|
|
|
pkgname=gitty
|
|
pkgver=2026.7.20
|
|
pkgrel=1
|
|
pkgdesc="A lightweight, modern Git client built with Tauri"
|
|
arch=('x86_64')
|
|
url="https://git.cbsk-tech.de/Christoph/GitLite"
|
|
license=('MIT')
|
|
depends=('webkit2gtk-4.1' 'gtk3' 'git' 'hicolor-icon-theme' 'libappindicator-gtk3' 'librsvg' 'xdotool')
|
|
makedepends=('rust' 'nodejs' 'npm')
|
|
options=('!lto' '!debug')
|
|
|
|
source=()
|
|
sha256sums=()
|
|
|
|
# Keeps pkgver in sync with package.json (the release CI bumps that file).
|
|
pkgver() {
|
|
cd "$startdir"
|
|
node -p "require('./package.json').version"
|
|
}
|
|
|
|
build() {
|
|
cd "$startdir"
|
|
|
|
# mistralrs-core is large enough that the regular release profile (thin LTO,
|
|
# one codegen unit and Arch debug flags) can exhaust memory in the LXC build
|
|
# runner. Keep the package optimized while bounding peak compiler memory.
|
|
export CARGO_BUILD_JOBS=1
|
|
export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
|
|
export CARGO_PROFILE_RELEASE_LTO=false
|
|
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=8
|
|
export CARGO_PROFILE_RELEASE_DEBUG=0
|
|
|
|
npm ci
|
|
# Build through the Tauri CLI (not a raw `cargo build --release`): it enables
|
|
# the `custom-protocol` cargo feature that makes the binary load the embedded
|
|
# `dist/` assets instead of the Vite dev server URL (127.0.0.1:1420), and runs
|
|
# `beforeBuildCommand` (`npm run build`) for us. `--no-bundle` skips deb/rpm/
|
|
# appimage packaging (and with it linuxdeploy/FUSE) since pacman owns that here.
|
|
npm run tauri -- build --no-bundle
|
|
}
|
|
|
|
package() {
|
|
cd "$startdir"
|
|
|
|
install -Dm755 "src-tauri/target/release/gitty" "$pkgdir/usr/bin/gitty"
|
|
|
|
install -Dm644 "src-tauri/icons/32x32.png" \
|
|
"$pkgdir/usr/share/icons/hicolor/32x32/apps/gitty.png"
|
|
install -Dm644 "src-tauri/icons/128x128.png" \
|
|
"$pkgdir/usr/share/icons/hicolor/128x128/apps/gitty.png"
|
|
install -Dm644 "src-tauri/icons/128x128@2x.png" \
|
|
"$pkgdir/usr/share/icons/hicolor/256x256@2/apps/gitty.png"
|
|
install -Dm644 "src-tauri/icons/icon.png" \
|
|
"$pkgdir/usr/share/icons/hicolor/512x512/apps/gitty.png"
|
|
|
|
install -d "$pkgdir/usr/share/applications"
|
|
cat > "$pkgdir/usr/share/applications/gitty.desktop" <<-EOF
|
|
[Desktop Entry]
|
|
Type=Application
|
|
Name=Gitty
|
|
Comment=$pkgdesc
|
|
Exec=gitty
|
|
Icon=gitty
|
|
Terminal=false
|
|
Categories=Development;RevisionControl;
|
|
StartupWMClass=gitty
|
|
EOF
|
|
|
|
install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
|
|
}
|