Skip to content

Commit

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

_realname=cargo-component
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.19.0
pkgrel=1
pkgdesc='A Cargo subcommand for creating WebAssembly components (mingw-w64)'
arch=('any')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
url='https://github.com/bytecodealliance/cargo-component'
license=('spdx:Apache-2.0')
depends=("${MINGW_PACKAGE_PREFIX}-rust-wasm")
makedepends=("${MINGW_PACKAGE_PREFIX}-rust")
source=("${url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('2081c277d3d9ef5392292ecf198f97cd218962452786d9a192bb8e314d35474a')

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

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 b538e70

Please sign in to comment.