1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00
falkonOfficial/linux/appimage/setup.sh

94 lines
2.1 KiB
Bash
Raw Normal View History

2018-05-01 22:59:49 +02:00
#!/usr/bin/env bash
2018-05-07 11:42:57 +02:00
set -e
NCPUS=$(getconf _NPROCESSORS_ONLN)
2018-05-01 22:59:49 +02:00
QT_INSTALL_URL="https://download.qt.io/official_releases/qt/5.10/5.10.1/qt-opensource-linux-x64-5.10.1.run"
2018-05-07 11:42:57 +02:00
FRAMEWORK_VERSION="5.45"
CMAKE_FRAMEWORKS_URL="https://download.kde.org/stable/frameworks/${FRAMEWORK_VERSION}"
MODULE_VERSION="${FRAMEWORK_VERSION}.0"
2018-05-01 22:59:49 +02:00
QTDIR="/root/Qt/5.10.1/gcc_64"
2018-05-09 18:11:57 +02:00
trap "rm -rf *${MODULE_VERSION} *.tar.xz phonon* qt-installer* setup.sh" EXIT 1 2
2018-05-07 11:42:57 +02:00
2018-05-01 22:59:49 +02:00
# Install Qt
cd /root
wget $QT_INSTALL_URL -O qt-installer
chmod u+x qt-installer
2018-05-07 11:42:57 +02:00
./qt-installer --script qt-installer-noninteractive.qs --platform minimal -v || :
2018-05-01 22:59:49 +02:00
echo "export QTDIR=$QTDIR" > /root/env.sh
2018-05-07 11:42:57 +02:00
NEEDED_MODULES="ki18n
kcoreaddons
kconfig
kwindowsystem
kauth
kcodecs
kguiaddons
kwidgetsaddons
kconfigwidgets
kdbusaddons
karchive
kitemviews
kiconthemes
knotifications
kcrash
kservice
kwallet
solid
sonnet
kcompletion
ktextwidgets
attica
kglobalaccel
kxmlgui
kbookmarks
kjobwidgets
kio"
moduleBuild() {
mkdir build && cd build
cmake -DBUILD_TESTING=OFF -DBUILD_QCH=OFF -DCMAKE_PREFIX_PATH=$QTDIR/lib/cmake -DCMAKE_INSTALL_PREFIX=$QTDIR -DCMAKE_INSTALL_LIBDIR=lib ..
make -j${NCPUS}
make install
}
2018-05-01 22:59:49 +02:00
# Install ECM
2018-05-07 11:42:57 +02:00
wget "${CMAKE_FRAMEWORKS_URL}/extra-cmake-modules-${MODULE_VERSION}.tar.xz" -O extra-cmake-modules.tar.xz
2018-05-01 22:59:49 +02:00
tar xf extra-cmake-modules.tar.xz
2018-05-07 11:42:57 +02:00
pushd extra-cmake-modules-${MODULE_VERSION}
moduleBuild
popd
2018-05-01 22:59:49 +02:00
2018-05-07 11:42:57 +02:00
# Install PHONON
wget https://download.kde.org/stable/phonon/4.10.1/phonon-4.10.1.tar.xz -O phonon.tar.xz
tar xf phonon.tar.xz
pushd phonon-4.10.1
2018-05-01 22:59:49 +02:00
mkdir build && cd build
2018-05-07 11:42:57 +02:00
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$QTDIR \
-DCMAKE_INSTALL_LIBDIR:PATH=lib \
-DPLUGIN_INSTALL_DIR:PATH=$QTDIR/plugins \
-DPHONON_BUILD_PHONON4QT5=ON -DCMAKE_PREFIX_PATH=$QTDIR ..
make -j${NCPUS}
make install
popd
2018-05-01 22:59:49 +02:00
2018-05-07 11:42:57 +02:00
# Install RQUIRED MODULES
for MODULE_NAME in ${NEEDED_MODULES}; do
wget "${CMAKE_FRAMEWORKS_URL}/${MODULE_NAME}-${MODULE_VERSION}.tar.xz" -O ${MODULE_NAME}.tar.xz
tar xf ${MODULE_NAME}.tar.xz
pushd ${MODULE_NAME}-${MODULE_VERSION}
moduleBuild
popd
done
2018-05-09 18:11:57 +02:00
pushd $QTDIR/plugins/kf5
chrpath --replace '$ORIGIN/../../lib' *.so
chrpath --replace '$ORIGIN/../../../lib' */*.so
popd
exit