summaryrefslogtreecommitdiff
blob: 8c7a4d261f85d84fb2b0e7786351b2f3f9f67aef (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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit udev toolchain-funcs

DESCRIPTION="Tool for working with Logitech Unifying receivers and devices"
HOMEPAGE="https://lekensteyn.nl/logitech-unifying.html https://git.lekensteyn.nl/ltunify/"
SRC_URI="https://git.lekensteyn.nl/${PN}/snapshot/${P}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

DOCS=(
	NEWS
	README.txt
)

PATCHES=(
	"${FILESDIR}/ltunify-0.3-compiler-warning.patch"
	"${FILESDIR}/ltunify-0.3-ldflags.patch"
)

src_configure() {
	tc-export CC
}

src_compile() {
	emake PACKAGE_VERSION=${PV} ${PN}
}

src_install() {
	dobin ${PN}
	dodoc "${DOCS[@]}"

	udev_dorules udev/42-logitech-unify-permissions.rules
}

pkg_postinst() {
	udev_reload
}

pkg_postrm() {
	udev_reload
}