recipes: Adjust 'docsdir' variable to be consistent with the current recipe format
[dragora.git] / recipes / boot / efivar / recipe
blobc3f22c631dc26bb7085caa269225d43e72b2d487
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
18 set -e
20 program=efivar
21 version=38
22 release=2
24 # Define a category for the output of the package name
25 pkgcategory=boot
27 description="
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/
35 license=LGPLv2.1+
37 tarname=${program}-${version}.tar.bz2
39 # Remote source(s)
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}"
46 build() {
47     unpack "${tardir}/$tarname"
49     cd "$srcdir"
51     # Set sane permissions
52     chmod -R u+w,go-w,a+rX-s .
54     # Apply patches
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"
61     # Compress man pages
62     if test -d "${destdir}/$mandir"
63     then
64         lzip -9 "${destdir}/${mandir}"/man?/*
65     fi
67     # Copy documentation
68     mkdir -p "${destdir}/$docsdir"
69     cp -p $docs "${destdir}/$docsdir"