Skip to content

Commit

Permalink
typstfmt: init at 0.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Sep 1, 2024
1 parent fa6084f commit 41ebe9d
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions mingw-w64-typstfmt/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>

_realname=typstfmt
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.2.10
pkgrel=1
pkgdesc="formatter for the Typst language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt32' 'ucrt64' 'clang32' 'clang64' 'clangarm64')
url=https://github.com/astrale-sharp/$_realname
license=('MIT' 'Apache')
makedepends=("${MINGW_PACKAGE_PREFIX}-rust")
source=("$url/archive/$pkgver.tar.gz")
sha256sums=('5a3f413a428b2590552c2d0ab0ab04c7a745e1cca128844b7b82ea49326d65c4')

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"

# if cargo wants to make an http request at build stage, use `cargo fetch --locked` instead
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
cd "${srcdir}/${_realname}-${pkgver}"

cargo build --release --frozen
}

check() {
cd "${srcdir}/${_realname}-${pkgver}"

cargo test --release --frozen
}

package() {
cd "${srcdir}/${_realname}-${pkgver}"

cargo install \
--offline \
--no-track \
--frozen \
--path . \
--root "${pkgdir}${MINGW_PREFIX}"

install -Dm644 LICENSE-* -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}"
}

0 comments on commit 41ebe9d

Please sign in to comment.