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

EAPI="7"

inherit linux-info systemd

DESCRIPTION="Modify realtime scheduling policy and priority of IRQ handlers"
HOMEPAGE="https://www.rncbc.org/archive/#rtirq"
SRC_URI="https://www.rncbc.org/archive/old/${P}.tar.gz"

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

src_prepare() {
	get_version

	# Correct config file path.
	sed -i -e "s:^\(RTIRQ_CONFIG\=\)\(.*\):\1/etc/conf.d/rtirq:" ${PN}.sh || die
	sed -i -e "s:/etc/sysconfig/rtirq:/etc/conf.d/rtirq:" ${PN}.conf || die

	default
}

src_install() {
	dosbin rtirq.sh
	doinitd "${FILESDIR}"/rtirq
	newconfd rtirq.conf rtirq
	systemd_dounit rtirq.service
}

pkg_postinst() {
	if [[ ${KV_LOCAL} != *rt* ]] ; then
		elog "To use rtirq you need a realtime kernel."
		elog "Realtime kernel sources are supplied in sys-kernel/rt-sources."
	fi
}