archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gnu-efi / trunk / PKGBUILD
blobf13ba2f3c7bb1120a38b9a96210be8537003a44c
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=gnu-efi
4 pkgver=3.0.17
5 pkgrel=2
6 pkgdesc="Develop EFI applications using the GNU toolchain and the EFI development environment"
7 arch=(x86_64)
8 url="https://sourceforge.net/projects/gnu-efi/"
9 license=(BSD)
10 conflicts=(gnu-efi-libs)
11 provides=(gnu-efi-libs)
12 replaces=(gnu-efi-libs)
13 source=(https://download.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
14 options=(!lto !strip)
15 sha512sums=('0893ca234272584f889b1ae1c75341a9ceee60acfd32765daa5d704191ba00450536a287b949304c6d055d1bf125cc29e24fc41df8e5230e0da4f9d944876512')
16 b2sums=('27f8171b411a6a8a138d44d91c7e4e4291aa399562825d51a398913572119482ffeb303d7508ae13eacd2cd10b8f5098405ab16eb56243587efe93235f661285')
18 prepare() {
19   # -Werror, not even once
20   sed -e 's/-Werror//g' -i $pkgname-$pkgver/Make.defaults
23 build() {
24   cd $pkgname-$pkgver
25   # NOTE: apply only minimal CFLAGS, as gnu-efi does not provide userspace
26   # libs, but may be used in unitialized machine state and should therefore not
27   # be architecture optmized
28   CFLAGS="-O2"
29   # upstream provides LDFLAGS directly to ld: https://sourceforge.net/p/gnu-efi/bugs/33/
30   LDFLAGS="${LDFLAGS//-Wl/}"
31   LDFLAGS="${LDFLAGS//,/ }"
32   make
33   make -C lib
34   make -C gnuefi
35   make -C inc
36   make -C apps
39 package() {
40   cd $pkgname-$pkgver
41   make INSTALLROOT="$pkgdir" PREFIX=/usr install
42   install -vDm 644 apps/*.efi -t "$pkgdir/usr/share/$pkgname/apps/$CARCH/"
43   install -vDm 644 README.efilib -t "$pkgdir/usr/share/licenses/$pkgname/"
44   install -vDm 644 {ChangeLog,README.{gnuefi,git,elilo}} -t "$pkgdir/usr/share/doc/$pkgname/"