vshost-util-vserver

Build script and sources for util-vserver.
git clone https://ccx.te2000.cz/git/vshost-util-vserver
Log | Files | Refs

install (1273B)


      1 #!/bin/sh
      2 set -x
      3 
      4 : ${destination_dir:=${HOME}/local}
      5 #: ${CFLAGS:=-Werror -Wno-attributes -no-pie -static}
      6 : ${CFLAGS:=-g -O2 -std=c99 -pedantic -W -funit-at-a-time -Werror=implicit-function-declaration -Wno-attributes --static}
      7 
      8 cd "$(dirname "$0")" || exit $?
      9 git checkout util-vserver || exit $?
     10 git clean -xf util-vserver || exit $?
     11 cd util-vserver || exit $?
     12 
     13 export CFLAGS
     14 ./configure \
     15 	--enable-static \
     16 	--disable-shared \
     17 	--enable-apis=compat,v13,net,v21,v22,v23,netv2 \
     18 	--prefix="$destination_dir" \
     19 	--bindir="$destination_dir/command" \
     20 	--sbindir="$destination_dir/command" \
     21 	--with-vrootdir=/vservers \
     22 	--localstatedir=/var \
     23 	--with-crypto-api=none \
     24 	|| exit $?
     25 #make src/chbind.o || exit $?  # TODO
     26 make CFLAGS="$CFLAGS" || exit $?
     27 make CFLAGS="$CFLAGS" check || exit $?
     28 if test -L "$destination_dir/etc/vservers"; then
     29 	# avoid installation encountering outside symlink
     30 	rm "$destination_dir/etc/vservers" || exit $?
     31 fi
     32 make CFLAGS="$CFLAGS" install || exit $?
     33 cd .. || exit $?
     34 rm -r "$destination_dir/etc/vservers" || exit $?
     35 ln -sf /etc/vservers "$destination_dir/etc/vservers" || exit $?
     36 gcc --static -I/root/local/include -L/root/local/lib -osignal-relay signal-relay.c -lvserver || exit $?
     37 mv signal-relay "$destination_dir/command" || exit $?