summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dca54589d80c07ac176c7fabe82744bcfc3dcd07 (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
# Maintainer: Alireza S.N. <alireza6677 at gmail dot com>

pkgname=libkrunfw-git
pkgver=v4.0.0.r0.g8a71842
pkgrel=1
pkgdesc="A dynamic library bundling the guest payload consumed by libkrun"
arch=("x86_64")
url="https://github.com/containers/libkrunfw"
license=("GPL2")
depends=("bc")
makedepends=("cargo" "git" "gcc" "python-pyelftools")
provides=("libkrunfw")
conflicts=("libkrunfw")
source=("${pkgname}::git+https://github.com/containers/libkrunfw")
md5sums=('SKIP')

pkgver() {
    cd "${pkgname}"
    ( set -o pipefail
      git describe --tags --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
      printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

build() {
    cd "${pkgname}"
    make -j4
}

package() {
    cd "${pkgname}"
    make install PREFIX="$pkgdir/usr"
    if [ -d "$pkgdir/usr/lib64" ]; then
        mv "$pkgdir/usr/lib64" "$pkgdir/usr/lib"
    fi
}