kiss-mfavila-large/ports/sninit-git/build
2021-08-23 23:06:34 +00:00

24 lines
394 B
Bash
Executable File

#!/bin/sh -e
export CFLAGS="$CFLAGS -static -fno-stack-protector"
export sbindir="/bin"
./configure
make PREFIX=/usr
make sbindir=/usr/bin DESTDIR="$1" install-stripped
rm -r etc/initdir/sys
mkdir -p "$1/etc/"
mv etc/initdir "$1/etc/initdir"
for file in etc/*
do install -Dm744 $file "$1/etc/"
done
mv init sninit
mv "$1/usr/bin/init" "$1/usr/bin/sninit"
ln -s sninit "$1/usr/bin/init"