summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cece6cdea92cc217fd312a6c994e0c8fd164714a (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Marco Huenseler <marco@wuthoehle.de>

pkgname=bootc-git
_pkgname=bootc
pkgver=1.13.0.r14.g99820c1
pkgrel=1
pkgdesc="Boot and upgrade via container images"
arch=('x86_64' 'i686' 'armv6h' 'armv7h')
url="https://bootc-dev.github.io/bootc"
_url="https://www.github.com/$_pkgname-dev/$_pkgname"
license=('MIT OR Apache-2.0')
depends=(gcc-libs
  glibc
  ostree)
makedepends=(cargo
  git
  go-md2man
  make)
provides=("bootc=$pkgver")
conflicts=('bootc')
source=("git+$_url.git")
sha256sums=('SKIP')
# options=(!lto)

prepare() {
  cd "$_pkgname"
  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
}

pkgver() {
  cd "$_pkgname"
  git describe --long --tags --abbrev=7 --match="v*" HEAD |
    sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$_pkgname"
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --release --frozen
}

package() {
  cd "$_pkgname"
  make "DESTDIR=${pkgdir}" install-all
}