2015-03-26 13:16:22 +08:00
|
|
|
#!/usr/bin/env bash
|
2014-09-11 06:36:34 +08:00
|
|
|
|
|
|
|
if which apt-get; then
|
2015-05-17 06:33:43 +08:00
|
|
|
sudo apt-get install \
|
|
|
|
git build-essential qt5-qmake qt5-default qttools5-dev-tools \
|
2016-04-16 12:49:12 +08:00
|
|
|
libqt5opengl5-dev libqt5svg5-dev libopenal-dev libavdevice-dev \
|
2015-05-17 06:33:43 +08:00
|
|
|
libxss-dev qrencode libqrencode-dev libtool autotools-dev \
|
2015-06-28 01:38:28 +08:00
|
|
|
automake checkinstall check libopus-dev libvpx-dev libsodium-dev \
|
2016-03-26 19:17:36 +08:00
|
|
|
libglib2.0-dev libgdk-pixbuf2.0-dev libgtk2.0-dev \
|
|
|
|
libsqlcipher-dev
|
2014-09-11 06:36:34 +08:00
|
|
|
elif which pacman; then
|
2015-05-17 06:33:43 +08:00
|
|
|
sudo pacman -S --needed \
|
2016-04-16 12:49:12 +08:00
|
|
|
git base-devel qt5 openal libxss qrencode opus libvpx libsodium
|
2015-05-17 06:33:43 +08:00
|
|
|
elif which dnf; then
|
|
|
|
sudo dnf group install \
|
2016-06-16 22:24:15 +08:00
|
|
|
"Development Tools" \
|
|
|
|
"C Development Tools and Libraries"
|
2016-04-29 18:33:57 +08:00
|
|
|
# pure Fedora doesn't have what it takes to compile qTox (ffmpeg)
|
2015-05-17 06:33:43 +08:00
|
|
|
sudo dnf install \
|
2016-04-29 18:33:57 +08:00
|
|
|
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
|
|
|
sudo dnf install \
|
|
|
|
git qt-devel qt-doc qt-creator qt5-qtsvg qt5-qtsvg-devel \
|
|
|
|
openal-soft-devel qt5-qttools-devel libXScrnSaver-devel \
|
|
|
|
qrencode-devel opus-devel libvpx-devel glib2-devel gdk-pixbuf2-devel \
|
2016-06-16 22:24:15 +08:00
|
|
|
gtk2-devel libsodium-devel ffmpeg-devel sqlite sqlite-devel libtool \
|
|
|
|
openssl-devel
|
|
|
|
# Fedora by default doesn't include libs in /usr/local/lib so add it
|
|
|
|
echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf
|
2015-09-03 03:40:16 +08:00
|
|
|
elif which zypper; then
|
|
|
|
sudo zypper in \
|
2016-03-27 23:12:49 +08:00
|
|
|
git patterns-openSUSE-devel_basis libqt5-qtbase-common-devel \
|
|
|
|
libqt5-qtsvg-devel libqt5-linguist libQt5Network-devel \
|
|
|
|
libQt5OpenGL-devel libQt5Concurrent-devel libQt5Xml-devel \
|
|
|
|
libQt5Sql-devel openal-soft-devel qrencode-devel \
|
|
|
|
libXScrnSaver-devel libQt5Sql5-sqlite libffmpeg-devel \
|
2016-04-29 18:33:57 +08:00
|
|
|
libsodium-devel libvpx-devel libopus-devel \
|
|
|
|
patterns-openSUSE-devel_basis sqlcipher-devel
|
2014-09-11 06:36:34 +08:00
|
|
|
else
|
|
|
|
echo "Unknown package manager, attempting to compile anyways"
|
|
|
|
fi
|
|
|
|
|
|
|
|
./bootstrap.sh
|
2015-09-03 03:40:16 +08:00
|
|
|
if [ -e /etc/redhat-release -o -e /etc/zypp ]; then
|
2015-07-24 05:01:21 +08:00
|
|
|
qmake-qt5
|
2015-07-23 01:42:12 +08:00
|
|
|
else
|
2015-07-24 05:01:21 +08:00
|
|
|
qmake
|
2015-07-23 01:42:12 +08:00
|
|
|
fi
|
2016-04-29 18:33:57 +08:00
|
|
|
make -j$(nproc)
|