Skip to content

Commit

Permalink
[new package] wac 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
podsvirov committed Dec 25, 2024
1 parent 1f26b0b commit db7c8d7
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions mingw-w64-wac/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>

_realname=wac
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.6.1
pkgrel=1
pkgdesc='WebAssembly Composition (WAC) tooling (mingw-w64)'
arch=('any')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
url='https://github.com/bytecodealliance/wac'
license=('spdx:Apache-2.0')
makedepends=("${MINGW_PACKAGE_PREFIX}-rust")
source=("${url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('ff0196b577118843d94961d6dc805758263af6ae16a62eb944242fd6a5c82eaa')

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

# For more info see: https://github.com/msys2/MINGW-packages/pull/22895
cargo update -p cc

cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

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

cargo build --release --frozen
}

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

cargo test --release --frozen
}

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

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

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

0 comments on commit db7c8d7

Please sign in to comment.