Skip to content

Commit

Permalink
rust: move split src files away in build function
Browse files Browse the repository at this point in the history
This matches what was already being done for the split docs package.
  • Loading branch information
jeremyd2019 committed Jun 14, 2024
1 parent fb4847f commit 7d08a7c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ build() {
mv dest-rust/${MINGW_PREFIX}/share/doc dest-doc
fi

# move src out of the way for splitting
mv dest-rust/${MINGW_PREFIX}/lib/rustlib/src dest-src

rm -f dest-rust/${MINGW_PREFIX}/lib/rustlib/$OSTYPE/lib/self-contained/*
}

Expand Down Expand Up @@ -249,9 +252,6 @@ package_rust() {
install -d "$pkgdir/${MINGW_PREFIX}/share/bash-completion/completions"
mv "${pkgdir}${MINGW_PREFIX}/etc/bash_completion.d/cargo" \
"${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/cargo"

install -d "${srcdir}/${MSYSTEM}/dest-src${MINGW_PREFIX}/lib/rustlib/src"
mv src/* "${srcdir}/${MSYSTEM}/dest-src${MINGW_PREFIX}/lib/rustlib/src"
}

package_rust-docs() {
Expand All @@ -270,7 +270,11 @@ package_rust-src() {
pkgdesc='Source code for the Rust standard library (mingw-w64)'

cd "${srcdir}/${MSYSTEM}"
cp -a dest-src/* ${pkgdir}
install -Dm644 "${srcdir}"/${_realname}c-${pkgver}-src/LICENSE-APACHE "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE-APACHE"
install -Dm644 "${srcdir}"/${_realname}c-${pkgver}-src/LICENSE-MIT "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname/LICENSE-MIT"

install -d "${pkgdir}/${MINGW_PREFIX}/lib/rustlib/src"
cp -a dest-src "${pkgdir}/${MINGW_PREFIX}/lib/rustlib/src"
}

# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
Expand Down

0 comments on commit 7d08a7c

Please sign in to comment.