cpufrequtils: perform minimal Makefile substitution & use makeFlags
Also, use multiple outputs
This commit is contained in:
@@ -15,18 +15,35 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-AFOgcYPQaUg70GJhS8YcuAgMV32mHN9+ExsGThoa8Yg=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
sed -e "s@= /usr/bin/@= @g" \
|
||||
-e "s@/usr/@$out/@" \
|
||||
-i Makefile
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace-fail /usr/bin/install install
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"bindir=$(out)/bin"
|
||||
"sbindir=$(out)/sbin"
|
||||
"mandir=$(man)/man"
|
||||
"includedir=$(dev)/include"
|
||||
"libdir=$(lib)/lib"
|
||||
"localedir=$(out)/share/locale"
|
||||
"docdir=$(man)/share/doc/packages/cpufrequtils"
|
||||
"confdir=$(out)/etc/"
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.libc.linuxHeaders
|
||||
libtool
|
||||
gettext
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"lib"
|
||||
"dev"
|
||||
"man"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Tools to display or change the CPU governor settings";
|
||||
homepage = "http://ftp.be.debian.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html";
|
||||
|
||||
Reference in New Issue
Block a user