summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e2b051a69ce0c0330c51ee6375208f09122eadc (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
47
48
49
50
51
52
53
# Maintainer: Manuel Wiesinger <m {you know what belongs here} mmap {and here} at>
# Maintainer: Peter Jung <admin@ptr1337.dev>

pkgname=virtme-ng
_virtme_ng_init_commit=6e2b515c5c178ba2ae3206933024ad24f658f368
pkgver=1.30
pkgrel=1
pkgdesc="A tool that allows to easily and quickly recompile and test a Linux kernel, starting from the source code."
arch=('x86_64')
url="https://github.com/arighi/virtme-ng"
license=('GPL-2.0-only')
depends=(
  busybox
  coreutils
  gcc-libs
  glibc
  python
  python-requests
  qemu
  virtiofsd
  python-argparse-manpage
)
makedepends=(
  cargo
  git
  python-argcomplete
  python-setuptools
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/arighi/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz"
       "virtme-init-ng-${_virtme_ng_init_commit}.zip::https://github.com/arighi/virtme-ng-init/archive/${_virtme_ng_init_commit}.zip")
b2sums=('1abea2912121dd6a7c9b5669910bae8ab793e1ed0b09ef9e8f482d95ef5ec81b96f785fb2878edc480bcbcf0fe76d269ad6ce67e27152ea1ef8e68a021c8d389'
        '6ca1d1288a07286bf8a240ec9e0ae955b5126936d51d902276050735df474e3be01d8f5238d08cfa3822a1c9310dcccc84bd69837c8bde1ac49d249f8c6e1d61')
conflicts=('virtme')

prepare() {
    cd "${srcdir}"

    # When rebuilding this dir is not empty, so rmdir(1) fails
    rm -rf "${pkgname}-${pkgver}/virtme_ng_init"

    cp -r "virtme-ng-init-${_virtme_ng_init_commit}" "${pkgname}-${pkgver}/virtme_ng_init"
}

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    export RUSTUP_TOOLCHAIN=stable
    BUILD_VIRTME_NG_INIT=1 python setup.py build
}

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    python setup.py install --root="$pkgdir/" --optimize=1
}