diff options
author | Cem Keylan <cem@ckyln.com> | 2020-10-04 22:54:34 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-10-04 22:54:34 +0300 |
commit | 0bcdb1b89d093e27181c9e291f48d6feba3db0e3 (patch) | |
tree | 68c1411cc5a9cb0de5a4eb70772656c304535e1a /core/runit | |
parent | 65b3fd06092f5645808e145a36072e18763c999e (diff) | |
download | repository-0bcdb1b89d093e27181c9e291f48d6feba3db0e3.tar.gz |
runit: fix build
Diffstat (limited to 'core/runit')
-rwxr-xr-x | core/runit/build | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/core/runit/build b/core/runit/build index 852e37c6..a8bdb9bb 100755 --- a/core/runit/build +++ b/core/runit/build @@ -1,46 +1,22 @@ #!/bin/sh -e -sed_i() { - for file; do :; done - sed "$@" > _ - cat _ > "$file"; rm -f _ -} - -read -r version _ < "${0%/*}/version" - -for patch in ./*.patch ; do - patch -p0 < "$patch" -done - -cd "runit-$version" +for patch in ./*.patch ; do patch -p0 < "$patch" ; done +cd "runit-$2" ( cd src - sed_i 's@sbin/runit@usr/bin/runit@g' runit.h + sed 's@sbin/runit@usr/bin/runit@g' -i runit.h printf '%s -D_GNU_SOURCE -static\n' "${CC-cc}" "$CFLAGS" > conf-cc printf '%s %s -static -Wl,-z -Wl,noexecstack\n' "${CC-cc}" "$CFLAGS" > conf-ld - sed_i 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c + sed -i 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c make - for bin in \ - chpst \ - runit \ - runit-init \ - runsv \ - runsvchdir \ - runsvdir \ - sv \ - svlogd \ - utmpset - do install -Dm755 "$bin" "$1/usr/bin/$bin"; done - + install -Dm755 -t "$1/usr/bin/" chpst runit runit-init runsv runsvchdir runsvdir sv svlogd utmpset ) -for man in man/man*; do - install -Dm644 "$man" "$1/usr/share/man/man8/${man#man/}" -done +install -Dm644 -t "$1/usr/share/man/man8" man/* mkdir -p "$1/var/service" "$1/etc/runit" ln -s runit-init "$1/usr/bin/init" @@ -48,5 +24,4 @@ ln -s /usr/lib/init/rc.boot "$1/etc/runit/1" ln -s /usr/lib/init/rc.shutdown "$1/etc/runit/3" install -Dm755 ../2 "$1/etc/runit/2" -install -Dm755 ../poweroff "$1/usr/bin/poweroff" -install -Dm755 ../reboot "$1/usr/bin/reboot" +install -Dm755 -t "$1/usr/bin" ../poweroff ../reboot |