Replace common functionality with rust implementation
This commit is contained in:
3
pkgbuilds/workstation-mgr/.gitignore
vendored
Normal file
3
pkgbuilds/workstation-mgr/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
!PKGBUILD
|
||||
41
pkgbuilds/workstation-mgr/PKGBUILD
Normal file
41
pkgbuilds/workstation-mgr/PKGBUILD
Normal file
@@ -0,0 +1,41 @@
|
||||
# Maintainer: Hannes Körber <hannes@hkoerber.de>
|
||||
pkgname='workstation-mgr'
|
||||
pkgver=3
|
||||
pkgrel=1
|
||||
pkgdesc=''
|
||||
arch=('x86_64')
|
||||
depends=('glibc' 'gcc-libs')
|
||||
makedepends=('cargo')
|
||||
source=()
|
||||
sha256sums=()
|
||||
|
||||
pkgver() {
|
||||
cd "/var/lib/dotfiles/mgr/"
|
||||
git log --oneline . | wc -l
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "/var/lib/dotfiles/mgr/"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "/var/lib/dotfiles/mgr/"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=/var/lib/makepkg/${pkgname}/build/target
|
||||
cargo build --frozen --release
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "/var/lib/dotfiles/mgr/"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo test --frozen
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "/var/lib/dotfiles/mgr/"
|
||||
export CARGO_TARGET_DIR=/var/lib/makepkg/${pkgname}/build/target
|
||||
install -Dm0755 -t "$pkgdir/usr/bin/" "${CARGO_TARGET_DIR}/release/${pkgname}"
|
||||
install -Dm0755 -t "$pkgdir/usr/bin/" "${CARGO_TARGET_DIR}/release/workstation-client"
|
||||
}
|
||||
Reference in New Issue
Block a user