summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 61469659d95cfd8a8f94e9befa2760de673b6f65 (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
# Maintainer: Jonas Witschel <diabonas@archlinux.org>
# Contributor: Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
# Contributor: Pablo Lezaeta <(prflr 88) (arro'a) (gmail) (puntocom)>
pkgname=shim-git
pkgver=15.6.r0.505cdb6
pkgrel=1
pkgdesc='UEFI shim loader'
arch=('x86_64')
url='https://github.com/rhboot/shim'
license=('BSD')
makedepends=('git')
checkdepends=('efivar' 'xxd')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=('shim-efi-git')
options=('!buildflags')
source=("git+$url.git"
        'rhboot-gnu-efi::git+https://github.com/rhboot/gnu-efi.git')
sha512sums=('SKIP'
            'SKIP')

pkgver() {
	cd shim
	git describe --long | sed 's/-rc/rc/;s/\([^-]*-\)g/r\1/;s/-/./g'
}

prepare() {
	cd shim
	git submodule init
	git config submodule.gnu-efi.url "$srcdir/rhboot-gnu-efi"
	git submodule update

	sed -e 's/-Werror\b//g' -i Makefile Make.defaults
}

build() {
	cd shim
	make
}

check() {
	cd shim
	make test
}

package() {
	cd shim
	make DESTDIR="$pkgdir" install-as-data
	install -Dm644 COPYRIGHT -t "$pkgdir/usr/share/licenses/$pkgname"
}