summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 540909779b2029ecd8675f118bc3efbb55d0a8aa (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
# Maintainer: Vladimir Panteleev <arch-pkg at thecybershadow.net>

pkgname=edk2-ovmf-macboot-git
pkgver=r22104.9bd03459f1
pkgrel=2
pkgdesc="edk2 UEFI firmware with macOS compatibility fixes"
arch=('any')
url="https://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/"
license=('BSD')
depends=()
makedepends=('git' 'nasm' 'iasl')
optdepends=()
source=("git+https://github.com/gsomlo/edk2#branch=macboot")
md5sums=('SKIP')
options=('!makeflags')

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

prepare() {
  cd "$srcdir/edk2"
  git remote add tianocore git@github.com:tianocore/edk2.git || true
  git fetch tianocore
  git merge --no-edit tianocore/master
}

build() {
  cd "$srcdir/edk2"
  make -C BaseTools
  bash -c '. edksetup.sh BaseTools && build -a X64 -t GCC5 -p OvmfPkg/OvmfPkgX64.dsc'
}

package() {
  cd "$srcdir/edk2"
  install -D -m644 -t "$pkgdir/usr/share/ovmf-macboot" "$(find ./Build/ -name OVMF.fd)"
}