| #!/bin/sh |
| set -ex |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| chmod -R u+w,go-w,a+rX . |
| umask 022 |
| |
| |
| |
| [ -z "$BUILDDIR" ] && BUILDDIR=build |
| |
| |
| |
| |
| |
| |
| if [ "$(locale charmap)" != "UTF-8" ] ; then |
| |
| |
| |
| export LC_CTYPE=C.UTF-8 |
| if [ "$(locale charmap)" != "UTF-8" ] ; then |
| |
| |
| |
| export LC_CTYPE=en_US.UTF-8 |
| if [ "$(locale charmap)" != "UTF-8" ] ; then |
| |
| echo "*** Could not find a valid locale that supports UTF-8. ***" >&2 |
| exit 1 |
| fi |
| fi |
| fi |
| |
| if [ ! -f "$BUILDDIR"/build.ninja ] ; then |
| sysvinit_path=`realpath /etc/init.d` |
| |
| nobody_user=`id -u -n 65534 2> /dev/null` |
| if [ "$nobody_user" != "" ] ; then |
| |
| if [ "`id -u $nobody_user`" != 65534 ] ; then |
| nobody_user="" |
| fi |
| fi |
| if [ "$nobody_user" = "" ] ; then |
| if id -u nobody 2> /dev/null ; then |
| |
| nobody_user=nfsnobody |
| else |
| |
| nobody_user=nobody |
| fi |
| fi |
| |
| nobody_group=`id -g -n 65534 2> /dev/null` |
| if [ "$nobody_group" != "" ] ; then |
| |
| if [ "`id -g $nobody_group`" != 65534 ] ; then |
| nobody_group="" |
| fi |
| fi |
| if [ "$nobody_group" = "" ] ; then |
| if id -u nobody 2> /dev/null ; then |
| |
| nobody_group=nfsnobody |
| else |
| |
| nobody_group=nobody |
| fi |
| fi |
| |
| meson "$BUILDDIR" -D "sysvinit-path=$sysvinit_path" -D default-hierarchy=unified -D man=false -D "nobody-user=$nobody_user" -D "nobody-group=$nobody_group" |
| fi |
| |
| ninja -C "$BUILDDIR" all |
| [ "$WITH_TESTS" = 0 ] || ninja -C "$BUILDDIR" test |
| ninja -C "$BUILDDIR" install |
| |
| mkdir -p "$DESTDIR"/etc |
| |
| cat > "$DESTDIR"/etc/issue <<EOF |
| \S (built from systemd tree) |
| Kernel \r on an \m (\l) |
| |
| EOF |