47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
# Template file for 'libfido2'
|
|
pkgname=libfido2
|
|
version=1.6.0
|
|
revision=2
|
|
build_style=cmake
|
|
configure_args="-DUDEV_RULES_DIR=/usr/lib/udev/rules.d"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="libcbor-devel openssl-devel eudev-libudev-devel"
|
|
short_desc="Library for FIDO 2.0, including communication with a device over USB"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="BSD-2-Clause"
|
|
homepage="https://github.com/Yubico/libfido2"
|
|
distfiles="https://github.com/Yubico/libfido2/archive/${version}.tar.gz"
|
|
checksum=6aed47aafd22be49c38f9281fb88ccd08c98678d9b8c39cdc87d1bb3ea2c63e4
|
|
# udev rules used to be shipped by libu2f-host
|
|
conf_files="/usr/lib/udev/rules.d/70-u2f.rules"
|
|
conflicts="libu2f-host<=1.1.10_3"
|
|
|
|
CFLAGS="-Wno-type-limits"
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
# ioctl takes int on musl
|
|
CFLAGS+=" -Wno-overflow"
|
|
fi
|
|
|
|
pre_configure() {
|
|
vsed -i -e "s;sign-conversion;no-sign-conversion;" \
|
|
{tools,src,examples}/CMakeLists.txt
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
vsed -e 's/GROUP="plugdev"/GROUP="users"/' \
|
|
-i ${DESTDIR}/usr/lib/udev/rules.d/70-u2f.rules
|
|
}
|
|
|
|
libfido2-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${sourcepkg}>=${version}_${revision} libcbor-devel"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/*.a
|
|
vmove usr/lib/*.so
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/share/man/man3
|
|
}
|
|
}
|