-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
typst: Include completions and man pages
- Loading branch information
Showing
2 changed files
with
21 additions
and
4 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
src | ||
typst | ||
pkg | ||
pkg | ||
typst-git* |
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 |
---|---|---|
@@ -1,28 +1,37 @@ | ||
# Maintainer: Nicholas Novak <[email protected]> | ||
|
||
pkgname=typst-git | ||
pkgver=r2301.360cc9b9 | ||
name=typst | ||
pkgver=r2346.d7928a8e | ||
pkgrel=1 | ||
pkgdesc="A new markup-based typesetting system that is powerful and easy to learn. " | ||
license=('Apache-2.0') | ||
arch=('any') | ||
makedepends=('git' 'cargo') | ||
provides=('typst') | ||
depends=() | ||
depends=('gcc-libs' 'glibc') | ||
url="https://github.com/typst/typst" | ||
source=( | ||
"typst::git+https://github.com/typst/typst" | ||
) | ||
md5sums=('SKIP') | ||
|
||
prepare() { | ||
cd "$srcdir/typst" | ||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu" | ||
} | ||
|
||
|
||
pkgver() { | ||
cd "$srcdir/typst" | ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | ||
} | ||
|
||
build() { | ||
cd "$srcdir/typst" | ||
cargo build -p typst-cli --release | ||
CFLAGS+=" -ffat-lto-objects" | ||
export GEN_ARTIFACTS=artifacts/ | ||
cargo build -p typst-cli --release --all-features | ||
} | ||
|
||
package() { | ||
|
@@ -31,5 +40,12 @@ package() { | |
|
||
# Install the licenses | ||
install -vDm 644 "$srcdir/typst/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | ||
|
||
# Install man pages and completions | ||
local _artifacts="$srcdir/typst/crates/typst-cli/artifacts" | ||
install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "$_artifacts/$name"*.1 | ||
install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" "$_artifacts/_$name" | ||
install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" "$_artifacts/$name.fish" | ||
install -Dm0644 "$_artifacts/$name.bash" "$pkgdir/usr/share/bash-completion/completions/$name" | ||
} | ||
|