makedeb
The Rust Programming Language toolkit
Viewing /PKGBUILD
.
Click here to go back to the Git tree for rust-bin.
# Maintainer: hiddeninthesand <hiddeninthesand at pm dot me>
# Contributor: Hunter Wittenborn <hunter@hunterwittenborn.com>
pkgname='rust-bin'
pkgver='1.67.1'
pkgrel='1'
pkgdesc='The Rust Programming Language toolkit'
arch=('amd64')
conflicts=(
'cargo'
'rust-clippy'
'rustfmt'
'rustc'
'rust-gdb'
'rust-lldb'
)
provides=("${conflicts[@]}")
url='https://www.rust-lang.org/'
options=('!strip')
source=("https://static.rust-lang.org/dist/rust-${pkgver}-x86_64-unknown-linux-gnu.tar.gz")
b2sums=('d4f78672efdc90d26cd4d07342453441c46d74fe2d789135ea802a37701fb84f583306ded820eaa6258206fff387cc491d3a655df234423fc18978bae8fbf5d9')
package() {
cd "rust-${pkgver}-x86_64-unknown-linux-gnu/"
mapfile -t folders < <(find ./ -mindepth 1 -maxdepth 1 -type d)
mkdir -v "${pkgdir}/usr"
for folder in "${folders[@]}"; do
cd "${folder}/"
mapfile -t folders2 < <(find ./ -mindepth 1 -maxdepth 1 -type d -not -path './etc')
if [[ -d './etc' ]]; then
cp -Rv './etc' "${pkgdir}/etc"
fi
for folder2 in "${folders2[@]}"; do
cp -Rv "${folder2}" "${pkgdir}/usr/"
done
cd ../
done
}
# vim: set sw=4 expandtab: