archrelease: copy trunk to extra-x86_64
[arch-packages.git] / efivar / trunk / PKGBUILD
blob1deeea122041a8c3ef3d7a06ac34d028b2bcece3
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
3 # Contributor: Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
5 pkgname=efivar
6 pkgdesc="Tools and libraries to work with EFI variables"
7 pkgver=37
8 pkgrel=4
9 arch=('x86_64')
10 url="https://github.com/rhboot/efivar"
11 license=('LGPL2.1')
12 makedepends=('git')
13 depends=('glibc')
14 provides=('libefiboot.so' 'libefivar.so')
15 source=("git+https://github.com/rhinstaller/efivar.git#tag=${pkgver}?signed")
16 sha512sums=('SKIP')
17 validpgpkeys=('B00B48BC731AA8840FED9FB0EED266B70F4FEF10') # Peter Jones <pjones@redhat.com>
19 prepare() {
20   mv -v "${pkgname}" "${pkgname}-${pkgver}"
21   cd "${pkgname}-${pkgver}"
22   # -Werror, not even once
23   sed -e 's/-Werror//g' -i gcc.specs
24   # remove insecure rpath in efivar-tester
25   sed 's|-rpath,$(TOPDIR)/src|-rpath,$(libdir)|g' -i src/test/Makefile
28 build() {
29   cd "${pkgname}-${pkgver}"
30   make libdir="/usr/lib/" \
31        bindir="/usr/bin/" \
32        mandir="/usr/share/man/" \
33        includedir="/usr/include/"
34   # build efivar-tester
35   make libdir="/usr/lib/" \
36        bindir="/usr/bin/" \
37        mandir="/usr/share/man/" \
38        includedir="/usr/include/" \
39        -C src/test
42 package() {
43   cd "${pkgname}-${pkgver}"
44   make DESTDIR="${pkgdir}/" \
45        libdir="/usr/lib/" \
46        bindir="/usr/bin/" \
47        mandir="/usr/share/man/" \
48        includedir="/usr/include/" install -j1 V=1
49   install -vDm 755 "src/test/tester" "${pkgdir}/usr/bin/efivar-tester"
50   install -vDm 644 {README.md,TODO} -t "${pkgdir}/usr/share/doc/${pkgname}"