summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 25bb4f9fc4bbef79adb9e752113990ecce1aac7b (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
# Maintainer: Huayu ZHANG <zhanghuayu.dev@gmail.com>

pkgname=qemu-full-aarch64
pkgver=7.2
pkgrel=1
pkgdesc="qemu full build from source for Arch Linux ARM (aarch64) with KVM enabled"
arch=('arm64')
url="https://www.qemu.org/"
license=('LGPL')
depends=('ninja' 'pixman' 'meson' 'gtk3-debug' 'capstone' 'vte' 'sdl2' 'glib2-debug' 'python' 'bzip2-debug' 'zlib-debug' 'dtc' 'slirp')
source=("https://github.com/qemu/qemu/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('36b38ab8e6596d75ae2e12f4f8fae897781c8f34d385983ad92520493e2f7fd6')

prepare() {
    cd "$srcdir/v$pkgver"
    mkdir full-build
    mkdir aarch64-kvm
    
}

build() {
    cd "$srcdir/v$pkgver"

    # build full first
    cd full-build

    ./configure \
        --prefix=/usr
    # edit /etc/makepkg.conf `MAKEFLAG` to speed up build
    make

    # build aarch64 with kvm  support
    cd ../aarch64-kvm

    ./configure \
        --prefix=/usr
        --target-list=aarch64-softmmu \
        --enable-fdt \
        --enable-kvm

    make
}

package() {
    cd "$srcdir/v$pkgver"
    cd full-build
    make DESTDIR="$pkgdir" install

    cd ../aarch64-kvm
    make DESTDIR="$pkgdir" install
}