-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e9e8f3
commit 6c78696
Showing
2 changed files
with
55 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Maintainer: Integral <[email protected]> | ||
# Contributor: Jisu-Woniu <[email protected]> | ||
|
||
pkgname=typstyle | ||
pkgver=0.12.14 | ||
pkgrel=1 | ||
pkgdesc="Beautiful and reliable typst code formatter" | ||
arch=('aarch64' 'armv7h' 'x86_64' 'riscv64') | ||
url="https://github.com/Enter-tainer/${pkgname}" | ||
license=('Apache-2.0') | ||
depends=('gcc-libs') | ||
makedepends=('cargo') | ||
optdepends=("typst: For typst compilation") | ||
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") | ||
sha256sums=('053ae2b6349fe244f44dc816f7d91036c152eeb14bfc2c6bfeeca33cc5ac0c34') | ||
|
||
prepare() { | ||
cd "${pkgname}-${pkgver}/" | ||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" | ||
} | ||
|
||
build() { | ||
cd "${pkgname}-${pkgver}/" | ||
cargo build --frozen --release --all-features | ||
} | ||
|
||
check() { | ||
cd "${pkgname}-${pkgver}/" | ||
cargo test --frozen --all-features | ||
} | ||
|
||
package() { | ||
cd "${pkgname}-${pkgver}/" | ||
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/" | ||
install -d "${pkgdir}/usr/share/doc/${pkgname}/" | ||
cp -r docs/* "${pkgdir}/usr/share/doc/${pkgname}/" | ||
|
||
cd target/release | ||
install -Dm755 "${pkgname}" -t "${pkgdir}/usr/bin/" | ||
"./${pkgname}" completions bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" | ||
"./${pkgname}" completions zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" | ||
"./${pkgname}" completions fish | install -Dm644 /dev/stdin "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
maintainers: | ||
- github: Integral-Tech | ||
email: [email protected] | ||
|
||
pre_build_script: update_pkgver_and_pkgrel(_G.newver) | ||
post_build_script: git_pkgbuild_commit() | ||
|
||
update_on: | ||
- source: github | ||
github: Enter-tainer/typstyle | ||
use_latest_release: true | ||
prefix: v |