1 # Recipe file for efivar.
3 # Copyright (c) 2022 DustDFG, <dfgdust@gmail.com>.
4 # Copyright (c) 2022 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
22 version=20220927_dd901c1
25 # Define a category for the output of the package name
29 Tools and libraries to work with EFI variables.
31 The efivar package provides a simple command-line interface to
32 the UEFI variable facility.
35 homepage=https://github.com/rhboot/efivar/
38 tarname=${program}-${version}.tar.lz
41 #fetch=https://github.com/rhboot/efivar/releases/download/${version}/$tarname
43 https://dragora.mirror.garr.it/current/sources/$tarname
44 rsync://rsync.dragora.org/current/sources/$tarname
47 # Source documentation
48 docs="COPYING TODO README.md"
49 docsdir="${docdir}/${program}-${version}"
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
61 # patch -Np1 -i "${worktree}/patches/efivar/efivar-efisecdb-atexit.patch"
62 patch -Np1 -i "${worktree}/patches/efivar/efivar-mandoc-groff.patch"
64 make -j${jobs} V=1 CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" LIBDIR="/usr/lib${libSuffix}" MANDIR="$mandir"
65 make -j${jobs} DESTDIR="$destdir" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" LIBDIR="/usr/lib${libSuffix}" MANDIR="$mandir" install
67 # Compress and link man pages (if needed)
68 if test -d "${destdir}/$mandir"
71 cd "${destdir}/$mandir"
72 find . -type f -exec lzip -9 {} +
73 find . -type l | while read -r file
75 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
82 mkdir -p "${destdir}/$docsdir"
83 cp -p $docs "${destdir}/$docsdir"