1 # Build recipe for p11-kit.
3 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
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.
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/networking"
24 tarname=${program}-${version}.tar.gz
27 fetch=http://github.com/p11-glue/p11-kit/releases/download/${version}/$tarname
30 Provides a way to load and enumerate PKCS#11 modules.
32 Provides a way to load and enumerate PKCS#11 modules. Provides a
33 standard configuration setup for installing PKCS#11 modules in such a
34 way that they're discoverable.
36 Also solves problems with coordinating the use of PKCS#11 by different
37 components or libraries living in the same process.
40 homepage=http://p11-glue.github.io/p11-glue/p11-kit.html
41 license="BSD 3-clause"
43 # Source documentation
44 docs="AUTHORS COPYING ChangeLog HACKING NEWS README"
45 docsdir="${docdir}/${program}-${version}"
51 unpack "${tardir}/$tarname"
55 # Set sane permissions
56 chmod -R u+w,go-w,a+rX-s .
58 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
60 --libdir=/usr/lib${libSuffix} \
68 --with-trust-paths=/etc/pki/anchors \
70 --build="$(cc -dumpmachine)"
73 make -j${jobs} DESTDIR="$destdir" install-strip
75 # Compress info documents deleting index file for the package
76 if test -d "${destdir}/$infodir"
78 rm -f "${destdir}/${infodir}/dir"
79 lzip -9 "${destdir}/${infodir}"/*
82 # Compress and link man pages (if needed)
83 if test -d "${destdir}/$mandir"
86 cd "${destdir}/$mandir"
87 find . -type f -exec lzip -9 '{}' +
88 find . -type l | while read -r file
90 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
97 mkdir -p "${destdir}${docsdir}"
98 cp -p $docs "${destdir}${docsdir}"