summaryrefslogtreecommitdiff
blob: a6c1aeee4cbe03e166e8c1a57021fe8f2413af19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools udev

MY_PN="yubikey-personalization"

DESCRIPTION="Library and tool for personalization of Yubico's YubiKey"
HOMEPAGE="https://github.com/Yubico/yubikey-personalization"
SRC_URI="https://github.com/Yubico/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv x86"

RDEPEND="dev-libs/json-c:=
	>=sys-auth/libyubikey-1.6
	virtual/libusb:1"
DEPEND="${RDEPEND}"
BDEPEND="app-text/asciidoc
	virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}"/${PN}-1.20.0-fix-gcc10-fno-common.patch
	"${FILESDIR}"/${PN}-1.20.0-json-boolean.patch
)

DOCS=( doc/. AUTHORS NEWS README )

S="${WORKDIR}/${MY_PN}-${PV}"

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	local myeconfargs=(
		--libdir=/usr/$(get_libdir)
		--localstatedir=/var
	)
	econf "${myeconfargs[@]}"
}

src_install() {
	default

	udev_dorules 69-yubikey.rules

	find "${D}" -name '*.la' -delete || die
}

pkg_postinst() {
	udev_reload
}

pkg_postrm() {
	udev_reload
}