1 # Recipe file for efivar.
3 # Copyright (c) 2022 DustDFG, <dfgdust@gmail.com>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
28 Tools and libraries to work with EFI variables.
30 The efivar package provides a simple command-line interface
31 to the UEFI variable facility.
34 homepage=https://github.com/rhboot/efivar/
37 tarname=${program}-${version}.tar.bz2
40 fetch=https://github.com/rhboot/efivar/releases/download/${version}/$tarname
42 # Source documentation
43 docs="COPYING TODO README.md"
44 docsdir="${docdir}/${program}-${version}"
47 unpack "${tardir}/$tarname"
51 # Set sane permissions
52 chmod -R u+w,go-w,a+rX-s .
56 patch -Np1 -i "${worktree}/patches/efivar/efivar-efisecdb-atexit.patch"
57 patch -Np1 -i "${worktree}/patches/efivar/efivar-mandoc-groff.patch"
59 make install CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" LIBDIR="/usr/lib${libSuffix}" DESTDIR="$destdir" MANDIR="$mandir"
62 if test -d "${destdir}/$mandir"
64 lzip -9 "${destdir}/${mandir}"/man?/*
68 mkdir -p "${destdir}/$docsdir"
69 cp -p $docs "${destdir}/$docsdir"