#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.1 # Package: webkitgtk4 #=========================== # DB commit: f9aede95e4e5157a46ec1323bb7abf8947e8632d # APP commit: #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: webkitgtk4" echo "Release: 0.2.1" echo "checking config file" if [ -f $ULFS_CONFIG_FILE ] then echo "loading config file $ULFS_CONFIG_FILE..." . $ULFS_CONFIG_FILE fi #Creating log directory mkdir -p /var/log/ulfs-packages/webkitgtk4/ #Saving start timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/start.time #Going to source directory... cd /sources #Checking dependances... #Checking icu... if [ ! -f /var/cache/ulfs-packages/icu ]; then echo "Dependance \"icu\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/icu/install -O - | bash if [ ! -f /var/cache/ulfs-packages/icu ]; then echo "Dependance \"icu\" is not installed. Exiting..." exit fi fi #Checking libtasn1... if [ ! -f /var/cache/ulfs-packages/libtasn1 ]; then echo "Dependance \"libtasn1\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/libtasn1/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libtasn1 ]; then echo "Dependance \"libtasn1\" is not installed. Exiting..." exit fi fi #Checking gobject-introspection... if [ ! -f /var/cache/ulfs-packages/gobject-introspection ]; then echo "Dependance \"gobject-introspection\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/gobject-introspection/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gobject-introspection ]; then echo "Dependance \"gobject-introspection\" is not installed. Exiting..." exit fi fi #Checking cmake... if [ ! -f /var/cache/ulfs-packages/cmake ]; then echo "Dependance \"cmake\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/cmake/install -O - | bash if [ ! -f /var/cache/ulfs-packages/cmake ]; then echo "Dependance \"cmake\" is not installed. Exiting..." exit fi fi #Checking mesa... if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/mesa/install -O - | bash if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" is not installed. Exiting..." exit fi fi #Checking cairo... if [ ! -f /var/cache/ulfs-packages/cairo ]; then echo "Dependance \"cairo\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/cairo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/cairo ]; then echo "Dependance \"cairo\" is not installed. Exiting..." exit fi fi #Checking hicolor-icon-theme... if [ ! -f /var/cache/ulfs-packages/hicolor-icon-theme ]; then echo "Dependance \"hicolor-icon-theme\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/hicolor-icon-theme/install -O - | bash if [ ! -f /var/cache/ulfs-packages/hicolor-icon-theme ]; then echo "Dependance \"hicolor-icon-theme\" is not installed. Exiting..." exit fi fi #Checking sqlite... if [ ! -f /var/cache/ulfs-packages/sqlite ]; then echo "Dependance \"sqlite\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/sqlite/install -O - | bash if [ ! -f /var/cache/ulfs-packages/sqlite ]; then echo "Dependance \"sqlite\" is not installed. Exiting..." exit fi fi #Checking libsecret... if [ ! -f /var/cache/ulfs-packages/libsecret ]; then echo "Dependance \"libsecret\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/libsecret/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libsecret ]; then echo "Dependance \"libsecret\" is not installed. Exiting..." exit fi fi #Checking gtk4... if [ ! -f /var/cache/ulfs-packages/gtk4 ]; then echo "Dependance \"gtk4\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/gtk4/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gtk4 ]; then echo "Dependance \"gtk4\" is not installed. Exiting..." exit fi fi #Checking libsoup3... if [ ! -f /var/cache/ulfs-packages/libsoup3 ]; then echo "Dependance \"libsoup3\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/libsoup3/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libsoup3 ]; then echo "Dependance \"libsoup3\" is not installed. Exiting..." exit fi fi #Checking bubblewrap... if [ ! -f /var/cache/ulfs-packages/bubblewrap ]; then echo "Dependance \"bubblewrap\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/bubblewrap/install -O - | bash if [ ! -f /var/cache/ulfs-packages/bubblewrap ]; then echo "Dependance \"bubblewrap\" is not installed. Exiting..." exit fi fi #Checking libgudev... if [ ! -f /var/cache/ulfs-packages/libgudev ]; then echo "Dependance \"libgudev\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/libgudev/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libgudev ]; then echo "Dependance \"libgudev\" is not installed. Exiting..." exit fi fi #Checking gst-plugins-base... if [ ! -f /var/cache/ulfs-packages/gst-plugins-base ]; then echo "Dependance \"gst-plugins-base\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/gst-plugins-base/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gst-plugins-base ]; then echo "Dependance \"gst-plugins-base\" is not installed. Exiting..." exit fi fi #Checking gst-plugins-bad... if [ ! -f /var/cache/ulfs-packages/gst-plugins-bad ]; then echo "Dependance \"gst-plugins-bad\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/gst-plugins-bad/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gst-plugins-bad ]; then echo "Dependance \"gst-plugins-bad\" is not installed. Exiting..." exit fi fi #Checking libwebp... if [ ! -f /var/cache/ulfs-packages/libwebp ]; then echo "Dependance \"libwebp\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/libwebp/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libwebp ]; then echo "Dependance \"libwebp\" is not installed. Exiting..." exit fi fi #Checking openjpeg... if [ ! -f /var/cache/ulfs-packages/openjpeg ]; then echo "Dependance \"openjpeg\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/openjpeg/install -O - | bash if [ ! -f /var/cache/ulfs-packages/openjpeg ]; then echo "Dependance \"openjpeg\" is not installed. Exiting..." exit fi fi #Checking lcms2... if [ ! -f /var/cache/ulfs-packages/lcms2 ]; then echo "Dependance \"lcms2\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/lcms2/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lcms2 ]; then echo "Dependance \"lcms2\" is not installed. Exiting..." exit fi fi #Checking ruby... if [ ! -f /var/cache/ulfs-packages/ruby ]; then echo "Dependance \"ruby\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/ruby/install -O - | bash if [ ! -f /var/cache/ulfs-packages/ruby ]; then echo "Dependance \"ruby\" is not installed. Exiting..." exit fi fi #Checking unifdef... if [ ! -f /var/cache/ulfs-packages/unifdef ]; then echo "Dependance \"unifdef\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/unifdef/install -O - | bash if [ ! -f /var/cache/ulfs-packages/unifdef ]; then echo "Dependance \"unifdef\" is not installed. Exiting..." exit fi fi #Checking which... if [ ! -f /var/cache/ulfs-packages/which ]; then echo "Dependance \"which\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/which/install -O - | bash if [ ! -f /var/cache/ulfs-packages/which ]; then echo "Dependance \"which\" is not installed. Exiting..." exit fi fi #Checking wpebackend-fdo... if [ ! -f /var/cache/ulfs-packages/wpebackend-fdo ]; then echo "Dependance \"wpebackend-fdo\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/wpebackend-fdo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/wpebackend-fdo ]; then echo "Dependance \"wpebackend-fdo\" is not installed. Exiting..." exit fi fi #Checking enchant... if [ ! -f /var/cache/ulfs-packages/enchant ]; then echo "Dependance \"enchant\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/enchant/install -O - | bash if [ ! -f /var/cache/ulfs-packages/enchant ]; then echo "Dependance \"enchant\" is not installed. Exiting..." exit fi fi #Checking geoclue... if [ ! -f /var/cache/ulfs-packages/geoclue ]; then echo "Dependance \"geoclue\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/geoclue/install -O - | bash if [ ! -f /var/cache/ulfs-packages/geoclue ]; then echo "Dependance \"geoclue\" is not installed. Exiting..." exit fi fi #Checking libavif... if [ ! -f /var/cache/ulfs-packages/libavif ]; then echo "Dependance \"libavif\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/libavif/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libavif ]; then echo "Dependance \"libavif\" is not installed. Exiting..." exit fi fi #Checking xdg-dbus-proxy... if [ ! -f /var/cache/ulfs-packages/xdg-dbus-proxy ]; then echo "Dependance \"xdg-dbus-proxy\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.2.1/xdg-dbus-proxy/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xdg-dbus-proxy ]; then echo "Dependance \"xdg-dbus-proxy\" is not installed. Exiting..." exit fi fi #Saving downloading timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/download.time #Downloading source package archive... wget --no-check-certificate -nc https://ulfs.org/linux/downloads/package_files/0.2.1/packages/w/webkitgtk-2.42.5.tar.xz.md5sum wget --no-check-certificate -nc https://ulfs.org/linux/downloads/package_files/0.2.1/packages/w/webkitgtk-2.42.5.tar.xz #Checking source package file existance if [ ! -f webkitgtk-2.42.5.tar.xz ]; then echo "Error: Can't find webkitgtk-2.42.5.tar.xz. Exiting!" exit fi #Checking source package file checksum if [ -f webkitgtk-2.42.5.tar.xz.md5sum ]; then MD5=`LANG=C md5sum -c webkitgtk-2.42.5.tar.xz.md5sum | grep OK` if [ "$MD5" == "" ] ; then echo "Error: Checksum of webkitgtk-2.42.5.tar.xz is wrong. Exiting!" exit fi fi #Saving cleanup timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/cleanup.time rm -rfv /sources/webkitgtk-2.42.5/ #Saving extracting timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/unpack.time #Extracting tar source package archive with default parameters... tar -xf webkitgtk-2.42.5.tar.xz #Checking package directory size after unpack... du -s webkitgtk-2.42.5 | awk 'NR==1 {print $1}' > /var/log/ulfs-packages/webkitgtk4/unpack.size #Going to source package directory... cd webkitgtk-2.42.5 #Saving configuration timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/configure.time #Sleep 1 second sleep 1 if [[ "$ULFS_PKG_DATERESET" == "YES" ]] then #Changing all files creation time (except build configuration files) in source directory to find them after installation find /sources/webkitgtk-2.42.5 \! -path "*/configure*" \! -path "*/Makefile*" \! -path "*.make" \! -path "*.m4" \! -path "*.am" \! -path "*.mk" \! -path "*.stamp" \! -path "*gentpl.py" -exec touch -m {} + fi #Running configuration script... echo "checking config file" if [ -f $ULFS_CONFIG_FILE ] then echo "loading config file $ULFS_CONFIG_FILE..." . $ULFS_CONFIG_FILE fi cat > ulfs_configure.sh << EOIS echo "Initializing distributed build environment... " if [[ "\$ULFS_ICECC" == "YES" ]] then export PATH="\$ULFS_ICECC_PATH:\$PATH" echo "ICECC" fi echo "Environment debug..." echo "PATH: \$PATH" echo "MAKEFLAGS: \$MAKEFLAGS" echo "NINJAJOBS: \$NINJAJOBS" env | grep ULFS mkdir -vp build4 && cd build4 && cmake -DCMAKE_BUILD_TYPE=Release \\ -DCMAKE_INSTALL_PREFIX=/usr \\ -DCMAKE_SKIP_RPATH=ON \\ -DPORT=GTK \\ -DLIB_INSTALL_DIR=/usr/lib \\ -DUSE_LIBHYPHEN=OFF \\ -DENABLE_GAMEPAD=OFF \\ -DENABLE_MINIBROWSER=ON \\ -DENABLE_DOCUMENTATION=OFF \\ -DUSE_WOFF2=OFF \\ -DUSE_GTK4=ON \\ -DUSE_JPEGXL=OFF \\ -DUSE_WPE_RENDERER=ON \\ -DENABLE_BUBBLEWRAP_SANDBOX=ON \\ -Wno-dev -G Ninja .. EOIS cat ulfs_configure.sh | bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk4/configure.log #Saving build timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/build.time #Running build script... echo "checking config file" if [ -f $ULFS_CONFIG_FILE ] then echo "loading config file $ULFS_CONFIG_FILE..." . $ULFS_CONFIG_FILE fi cat > ulfs_build.sh << EOIS echo "Initializing distributed build environment... " if [[ "\$ULFS_ICECC" == "YES" ]] then export PATH="\$ULFS_ICECC_PATH:\$PATH" echo "ICECC" fi echo "Environment debug..." echo "PATH: \$PATH" echo "MAKEFLAGS: \$MAKEFLAGS" echo "NINJAJOBS: \$NINJAJOBS" env | grep ULFS cd build4 && ninja EOIS cat ulfs_build.sh | bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk4/build.log #Saving install timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/install.time #Running install script... cat > ulfs_install.sh << EOIS cd build4 && ninja install EOIS USER=`whoami` if [ "$USER" == "root" ] ; then cat ulfs_install.sh | bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk4/install.log else cat ulfs_install.sh | sudo bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk4/install.log fi #Saving finish timestamp date +%s > /var/log/ulfs-packages/webkitgtk4/finish.time #Checking package directory size after unpack... cd /sources du -s webkitgtk-2.42.5 | awk 'NR==1 {print $1}' > /var/log/ulfs-packages/webkitgtk4/install.size echo "ULFS package installation completed." #Producing files list echo "Looking for installed files..." if [ -f /var/log/ulfs-packages/webkitgtk4/files.txt ]; then rm /var/log/ulfs-packages/webkitgtk4/files.txt fi USER=`whoami` if [ "$USER" == "root" ] ; then find /bin -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt find /sbin -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt find /usr -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt find /etc -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt find /opt -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt find /lib -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt find /lib64 -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt find /var -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time \! -path "/var/log/ulfs-packages/webkitgtk4/*" >> /var/log/ulfs-packages/webkitgtk4/files.txt else sudo find /bin -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt sudo find /sbin -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt sudo find /usr -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt sudo find /etc -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt sudo find /opt -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt sudo find /lib -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt sudo find /lib64 -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time >> /var/log/ulfs-packages/webkitgtk4/files.txt sudo find /var -type f -newer /var/log/ulfs-packages/webkitgtk4/configure.time \! -newer /var/log/ulfs-packages/webkitgtk4/finish.time \! -path "/var/log/ulfs-packages/webkitgtk4/*" >> /var/log/ulfs-packages/webkitgtk4/files.txt fi #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/webkitgtk4 else sudo touch /var/cache/ulfs-packages/webkitgtk4 fi #Calculate delta size a=`cat /var/log/ulfs-packages/webkitgtk4/unpack.size` b=`cat /var/log/ulfs-packages/webkitgtk4/install.size` c=$(($b-$a)) echo $c > /var/log/ulfs-packages/webkitgtk4/delta.size #Calculate prepare time a=`cat /var/log/ulfs-packages/webkitgtk4/start.time` b=`cat /var/log/ulfs-packages/webkitgtk4/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/webkitgtk4/download.time` b=`cat /var/log/ulfs-packages/webkitgtk4/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/webkitgtk4/configure.time` b=`cat /var/log/ulfs-packages/webkitgtk4/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/webkitgtk4/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: webkitgtk4" echo "Release: 0.2.1" echo "Build size: $c" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script