54 lines
927 B
Bash
54 lines
927 B
Bash
# Copyright 1999-2018 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=5
|
|
inherit linux-info git-r3 autotools epatch
|
|
|
|
DESCRIPTION="Simple script to tune whether and with what vigor ksm searches for dup pages"
|
|
HOMEPAGE="https://github.com/ksmtuned/ksmtuned"
|
|
EGIT_REPO_URI="${HOMEPAGE}.git"
|
|
|
|
LICENSE="GPL-2"
|
|
SLOT="0"
|
|
KEYWORDS=""
|
|
IUSE=""
|
|
|
|
DEPEND=""
|
|
RDEPEND="${DEPEND}"
|
|
|
|
kernel_check() {
|
|
CONFIG_CHECK="KSM"
|
|
use kernel_linux && check_extra_config
|
|
}
|
|
|
|
src_prepare() {
|
|
cp ${FILESDIR}/*.{am,ac} ${S}
|
|
cp ${FILESDIR}/src/*.am ${S}/src
|
|
epatch "${FILESDIR}/001-sysconfdir.patch"
|
|
eautoreconf
|
|
}
|
|
|
|
src_configure() {
|
|
econf
|
|
}
|
|
|
|
src_compile() {
|
|
emake
|
|
}
|
|
|
|
src_install() {
|
|
dosbin src/ksmctl
|
|
newsbin src/ksmtuned.sh.in ksmtuned
|
|
|
|
newconfd data/sysconfig/ksm ksm
|
|
|
|
insinto /etc
|
|
doins data/ksmtuned.conf
|
|
|
|
newinitd ${FILESDIR}/initd_ksmtuned ksmtuned
|
|
newinitd ${FILESDIR}/initd_ksm ksm
|
|
|
|
#dodoc TODO
|
|
}
|
|
|