summaryrefslogtreecommitdiff
path: root/media-sound/headsetcontrol/headsetcontrol-3.1.0-r1.ebuild
blob: c075051a49a9b4dc64aba10e19e68b15efcc4ed5 (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
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake udev

MY_PN="HeadsetControl"

DESCRIPTION="A tool to control certain aspects of USB-connected headsets on Linux"
HOMEPAGE="https://github.com/Sapd/HeadsetControl"
SRC_URI="https://github.com/Sapd/HeadsetControl/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"

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

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

IUSE="udev"

DEPEND="
	dev-libs/hidapi
	udev? ( virtual/udev )
"
RDEPEND="${DEPEND}"

src_prepare() {
	default
	sed -i "s#lib/udev/rules.d/#$(get_udevdir)/rules.d#" CMakeLists.txt || die "Failed correcting udev rules directory"
	sed -i "s#@GIT_VERSION@#${PV}#" src/version.h.in || die "Failed setting version"
	cmake_src_prepare
}

pkg_postinst() {
	use udev && udev_reload
}

pkg_postrm() {
	use udev && udev_reload
}