summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: db6a3ade57e29c16621583d4941a2b3a4e3215a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pkgname=firecracker-git
_gitname=firecracker
pkgver=r1
pkgrel=1
pkgdesc="Secure and fast microVMs for serverless computing"
url="https://github.com/firecracker-microvm/firecracker"
depends=()
makedepends=('rustup' 'musl')
arch=('x86_64')
license=('Apache:2.0')
source=("git+https://github.com/firecracker-microvm/firecracker.git")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_gitname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}/${_gitname}"
  rustup target install x86_64-unknown-linux-musl
  cargo build --release
  #tools/devtool build
}

package() {
  cd "${srcdir}/${_gitname}"
  install -Dm755 target/x86_64-unknown-linux-musl/release/firecracker "$pkgdir/usr/bin/firecracker"
  install -Dm755 target/x86_64-unknown-linux-musl/release/jailer "$pkgdir/usr/bin/jailer"
  install -m644 -D LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  install -m644 -D README.md "$pkgdir"/usr/share/licenses/$pkgname/README.md
}