about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/sysvinit/builder.sh
blob: 198fa9ba4160b5cd83855aca1020ecf7d2ffae69 (plain) (blame)
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
source $stdenv/setup

makeFlagsArray=(LCRYPT=-lcrypt BIN_OWNER=$(id -u) BIN_GROUP=$(id -g) ROOT=$out)

preBuild="cd src"

preInstall() {
    substituteInPlace Makefile --replace /usr /
    mkdir $out
    mkdir $out/bin
    mkdir $out/sbin
    mkdir $out/include
    mkdir $out/share
    mkdir $out/share/man
    mkdir $out/share/man/man1
    mkdir $out/share/man/man5
    mkdir $out/share/man/man8
}

postInstall() {
    if test -n "$withoutInitTools"; then
	mv $out/sbin/killall5 $out/bin
	ln -sf killall5 $out/bin/pidof
	rm -rf $out/sbin
	rm -rf $out/include
	rm -rf $out/share/man/man5
	rm -rf $out/share/man/man8
    fi
}

genericBuild