Skip to content

Commit

Permalink
wasmtime: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
podsvirov committed Oct 6, 2024
1 parent c10e1ac commit 0f81703
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions mingw-w64-wasmtime/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
_realname=wasmtime
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-lib${_realname}")
"${MINGW_PACKAGE_PREFIX}-lib${_realname}"
"${MINGW_PACKAGE_PREFIX}-${_realname}-docs")
pkgver=25.0.1
pkgrel=1
pkgrel=2
pkgdesc="A fast and secure runtime for WebAssembly (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -18,6 +19,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-rust"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-zstd"
"${MINGW_PACKAGE_PREFIX}-mdbook"
'git')
source=("git+${msys2_repository_url}.git#tag=v${pkgver}"
"zstd-sys.tar.gz::https://crates.io/api/v1/crates/zstd-sys/2.0.9+zstd.1.5.5/download"
Expand Down Expand Up @@ -73,6 +75,9 @@ build() {
--profile fastest-runtime \
-p wasmtime-cli \
--manifest-path "${_realname}/Cargo.toml"

cd "${srcdir}/${_realname}/docs"
mdbook build
}

check() {
Expand Down Expand Up @@ -106,6 +111,16 @@ package_libwasmtime() {
install -Dm644 "${_realname}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}

package_wasmtime-docs() {
pkgdesc+=" (Documentation)"
depends=()

cd "${_realname}"

install -d "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/html/"
cp -r -t "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/html/" docs/book/*
}

# vim: set ft=bash :

# generate wrappers
Expand Down

0 comments on commit 0f81703

Please sign in to comment.