#!/bin/bash . ./scripts/colors.sh . ./scripts/funcs.sh . ./scripts/config.sh finit_init() { print_info "** Building and installing finit" [ -d $build/finit ] && return 0 mkdir -p $build/finit cd $build/finit if [ ! -d libite ]; then git clone https://gitea.home.com:3000/TolaMironcenko/libite.git check $? "Download libite" fi if [ ! -d libuev ]; then git clone https://gitea.home.com:3000/TolaMironcenko/libuev.git check $? "Download libuev" fi if [ ! -d finit ]; then git clone https://gitea.home.com:3000/TolaMironcenko/finit.git check $? "Download finit" fi cd libite ./autogen.sh check $? "Autogen libite" ./configure \ --host=$CROSS_COMPILE \ --prefix=/usr \ --with-sysroot=$rootfspath check $? "Configure libite" make $makeflags check $? "Build libite" make DESTDIR=$rootfspath install check $? "Installing to rootfs libite" cd ../libuev ./autogen.sh check $? "Autogen libuev" ./configure \ --host=$CROSS_COMPILE \ --prefix=/usr \ --with-sysroot=$rootfspath check $? "Configure libuev" make $makeflags check $? "Build libuev" make DESTDIR=$rootfspath install check $? "Installing to rootfs libuev" cd ../finit ./autogen.sh check $? "Autogen finit" PKG_CONFIG_PATH=$rootfspath/usr/lib/pkgconfig ./configure \ --host=$CROSS_COMPILE \ --prefix=/usr \ --exec-prefix= \ --sysconfdir=/etc \ --localstatedir=/var \ --with-watchdog \ --with-keventd \ --with-sulogin \ --with-sysroot=$rootfspath \ --enable-resolvconf-plugin \ --enable-modules-load-plugin check $? "Configure finit" make $makeflags check $? "Build finit" make DESTDIR=$rootfspath install check $? "Installing to rootfs finit" }