Command explanations sed -i "s:cp -f:install:" mkspecs/linux-g++/qmake.conf: install is safer than cp when libraries are in use. bash: This command enters a sub-shell to isolate environment changes. export LD_LIBRARY_PATH=$PWD/lib: This command sets up the location of libraries for the build process. export PATH=$PWD/bin:$PATH: This command allows the build process to find supporting executables. -qt-gif: This switch adds support for gif files to the libraries. -system-zlib -system-libpng: This switch forces the library to use the shared libraries that are on your system instead of recreating its own set of support libraries for these functions. -no-g++-exceptions: This switch disables the exceptions coding generated by the C++ compiler. -thread: This switch adds support for multi-threading. find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib@@g": This command removes hardcoded run-time path, else uic tries to run with system installed Qt libraries. ln -s libqt-mt.so /usr/lib/libqt.so: This command allows configure scripts to find a working Qt installation. cp -r doc/man /usr/share: This command installs the man pages which are missed by make install. cp -r examples /usr/share/doc/qt: This command installs the examples which are missed by make install. exit: This command returns to the parent shell and eliminates environment variables set earlier.