aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-15 21:07:31 +0300
committerCem Keylan <cem@ckyln.com>2020-05-15 21:07:31 +0300
commit8cacb07a4048b2b2d50a9a0fc124d45f38eefd96 (patch)
tree51916094fdc483060208064de5fb8f38a967a379
parent33108afb5ed70017e37a96efec79295f2b0d22cd (diff)
downloadrepository-8cacb07a4048b2b2d50a9a0fc124d45f38eefd96.tar.gz
runit: portable install calls
-rwxr-xr-xcore/runit/build29
1 files changed, 24 insertions, 5 deletions
diff --git a/core/runit/build b/core/runit/build
index 9b848bf9..2176daa1 100755
--- a/core/runit/build
+++ b/core/runit/build
@@ -1,7 +1,12 @@
#!/bin/sh -e
-for patch in ./*.patch ; do patch -p0 < "$patch" ; done
-cd runit-2.1.2
+read -r version _ < "${0%/*}/version"
+
+for patch in ./*.patch ; do
+ patch -p0 < "$patch"
+done
+
+cd "runit-$version"
(
cd src
@@ -13,10 +18,23 @@ cd runit-2.1.2
make
- install -Dm755 -t "$1/usr/bin/" chpst runit runit-init runsv runsvchdir runsvdir sv svlogd utmpset
+ for bin in \
+ chpst \
+ runit \
+ runit-init \
+ runsv \
+ runsvchdir \
+ runsvdir \
+ sv \
+ svlogd \
+ utmpset
+ do install -Dm755 "$bin" "$1/usr/bin/$bin"; done
+
)
-install -Dm644 -t "$1/usr/share/man/man8" man/*
+for man in man/man*; do
+ install -Dm644 "$man" "$1/usr/share/man/man8/${man#man/}"
+done
mkdir -p "$1/var/service" "$1/etc/runit"
ln -s runit-init "$1/usr/bin/init"
@@ -24,4 +42,5 @@ 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 -t "$1/usr/bin" ../poweroff ../reboot
+install -Dm755 ../poweroff "$1/usr/bin/poweroff"
+install -Dm755 ../reboot "$1/usr/bin/reboot"