Unverified Commit 019583c0 authored by Amin Bandali's avatar Amin Bandali Committed by Maxim Cournoyer
Browse files

debian: build and package our own Qt

Change-Id: I983607f226476c32a6862a41b55ca1b13a2c010b
parent 2b865045
......@@ -41,6 +41,15 @@ DEBIAN_OCI_VERSION:=$(RELEASE_VERSION)~dfsg1-0
DEBIAN_OCI_DSC_FILENAME:=jami_$(DEBIAN_OCI_VERSION).dsc
DEBIAN_OCI_PKG_DIR:="packaging/rules/debian-one-click-install"
# Qt versions
QT_MAJOR:=5
QT_MINOR:=15
QT_PATCH:=2
QT_TARBALL_CHECKSUM:="3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240"
DEBIAN_QT_VERSION:=$(QT_MAJOR).$(QT_MINOR).$(QT_PATCH)-1
DEBIAN_QT_DSC_FILENAME:=libqt-jami_$(DEBIAN_QT_VERSION).dsc
QT_JAMI_PREFIX:="/usr/lib/libqt-jami"
#####################
## Other variables ##
#####################
......
FROM debian:buster
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retries=10 \
devscripts \
wget
# add/enable src repos (needed for next step)
RUN sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list
RUN apt-get clean && apt-get update
COPY packaging/rules/debian-qt/* ${OVERRIDE_PACKAGING_DIR} /tmp/builddeps/debian/
RUN cd /tmp/builddeps/debian; \
if [ -n "${OVERRIDE_PACKAGING_DIR}" ] && [ -d "$(basename ${OVERRIDE_PACKAGING_DIR})" ]; then \
mv "$(basename ${OVERRIDE_PACKAGING_DIR})"/* .; \
rm -r "$(basename ${OVERRIDE_PACKAGING_DIR})"; \
fi; \
cd ..; \
apt-get update; \
mk-build-deps \
--remove --install \
--tool "apt-get -y --no-install-recommends -o Acquire::Retries=10" \
"debian/control"; \
cd / && rm -rf /tmp/builddeps
ADD scripts/build-package-debian-qt.sh /opt/build-package-debian-qt.sh
CMD /opt/build-package-debian-qt.sh
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retries=10 \
devscripts \
equivs \
wget
# add/enable src repos (needed for next step)
RUN sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list
RUN apt-get clean && apt-get update
COPY packaging/rules/debian-qt/* ${OVERRIDE_PACKAGING_DIR} /tmp/builddeps/debian/
RUN cd /tmp/builddeps/debian; \
if [ -n "${OVERRIDE_PACKAGING_DIR}" ] && [ -d "$(basename ${OVERRIDE_PACKAGING_DIR})" ]; then \
mv "$(basename ${OVERRIDE_PACKAGING_DIR})"/* .; \
rm -r "$(basename ${OVERRIDE_PACKAGING_DIR})"; \
fi; \
cd ..; \
apt-get update; \
mk-build-deps \
--remove --install \
--tool "apt-get -y --no-install-recommends -o Acquire::Retries=10" \
"debian/control"; \
cd / && rm -rf /tmp/builddeps
ADD scripts/build-package-debian-qt.sh /opt/build-package-debian-qt.sh
CMD /opt/build-package-debian-qt.sh
FROM i386/ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retries=10 \
devscripts \
equivs \
wget
# add/enable src repos (needed for next step)
RUN sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list
RUN apt-get clean && apt-get update
COPY packaging/rules/debian-qt/* ${OVERRIDE_PACKAGING_DIR} /tmp/builddeps/debian/
RUN cd /tmp/builddeps/debian; \
if [ -n "${OVERRIDE_PACKAGING_DIR}" ] && [ -d "$(basename ${OVERRIDE_PACKAGING_DIR})" ]; then \
mv "$(basename ${OVERRIDE_PACKAGING_DIR})"/* .; \
rm -r "$(basename ${OVERRIDE_PACKAGING_DIR})"; \
fi; \
cd ..; \
apt-get update; \
mk-build-deps \
--remove --install \
--tool "apt-get -y --no-install-recommends -o Acquire::Retries=10" \
"debian/control"; \
cd / && rm -rf /tmp/builddeps
ADD scripts/build-package-debian-qt.sh /opt/build-package-debian-qt.sh
CMD /opt/build-package-debian-qt.sh
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retries=10 \
devscripts \
equivs \
wget
# add/enable src repos (needed for next step)
RUN sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list
RUN apt-get clean && apt-get update
COPY packaging/rules/debian-qt/* ${OVERRIDE_PACKAGING_DIR} /tmp/builddeps/debian/
RUN cd /tmp/builddeps/debian; \
if [ -n "${OVERRIDE_PACKAGING_DIR}" ] && [ -d "$(basename ${OVERRIDE_PACKAGING_DIR})" ]; then \
mv "$(basename ${OVERRIDE_PACKAGING_DIR})"/* .; \
rm -r "$(basename ${OVERRIDE_PACKAGING_DIR})"; \
fi; \
cd ..; \
apt-get update; \
mk-build-deps \
--remove --install \
--tool "apt-get -y --no-install-recommends -o Acquire::Retries=10" \
"debian/control"; \
cd / && rm -rf /tmp/builddeps
ADD scripts/build-package-debian-qt.sh /opt/build-package-debian-qt.sh
CMD /opt/build-package-debian-qt.sh
FROM ubuntu:20.10
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retries=10 \
devscripts \
equivs \
wget
# add/enable src repos (needed for next step)
RUN sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list
RUN apt-get clean && apt-get update
COPY packaging/rules/debian-qt/* ${OVERRIDE_PACKAGING_DIR} /tmp/builddeps/debian/
RUN cd /tmp/builddeps/debian; \
if [ -n "${OVERRIDE_PACKAGING_DIR}" ] && [ -d "$(basename ${OVERRIDE_PACKAGING_DIR})" ]; then \
mv "$(basename ${OVERRIDE_PACKAGING_DIR})"/* .; \
rm -r "$(basename ${OVERRIDE_PACKAGING_DIR})"; \
fi; \
cd ..; \
apt-get update; \
mk-build-deps \
--remove --install \
--tool "apt-get -y --no-install-recommends -o Acquire::Retries=10" \
"debian/control"; \
cd / && rm -rf /tmp/builddeps
ADD scripts/build-package-debian-qt.sh /opt/build-package-debian-qt.sh
CMD /opt/build-package-debian-qt.sh
10
\ No newline at end of file
Source: libqt-jami
Section: libs
Priority: optional
Maintainer: The Jami project <jami@gnu.org>
Rules-Requires-Root: no
Standards-Version: 4.5.1
Build-Depends: debhelper (>= 9),
# =====================================================
# the following list of deps was gathered with help
# from https://salsa.debian.org/qt-kde-team/qt repos
# =====================================================
#
# ======
# qtbase
# ======
# debhelper-compat (= 13),
# debhelper,
default-libmysqlclient-dev,
dh-exec,
# dpkg-dev (>= 1.17.14),
dpkg-dev,
firebird-dev [kfreebsd-any linux-any],
freetds-dev,
libasound2-dev [linux-any],
libatspi2.0-dev,
libcups2-dev,
libdbus-1-dev,
libdouble-conversion-dev,
libdrm-dev [linux-any],
libfontconfig1-dev,
libfreetype6-dev,
libgbm-dev [linux-any kfreebsd-any],
libgl-dev,
# libgles-dev, (not available in buster)
libglib2.0-dev,
# libglu1-mesa-dev | libglu-dev,
libgtk-3-dev,
libharfbuzz-dev (>= 1.6.0~),
libicu-dev,
libinput-dev [linux-any],
libjpeg-dev,
libkrb5-dev,
# libmd4c-dev, (not in buster)
libmtdev-dev [linux-any],
libpcre2-dev,
libpng-dev,
libpq-dev,
libproxy-dev,
libpulse-dev,
libsqlite3-dev,
libssl-dev,
libudev-dev [linux-any],
libvulkan-dev [linux-any],
libx11-dev,
libx11-xcb-dev,
libxcb-glx0-dev,
libxcb-icccm4-dev,
libxcb-image0-dev,
libxcb-keysyms1-dev,
libxcb-randr0-dev,
libxcb-render-util0-dev,
libxcb-render0-dev,
libxcb-shape0-dev,
libxcb-shm0-dev,
libxcb-sync-dev,
libxcb-util0-dev,
libxcb-xfixes0-dev,
libxcb-xinerama0-dev,
libxcb-xinput-dev,
libxcb-xkb-dev,
libxcb1-dev,
libxext-dev,
libxi-dev,
libxkbcommon-dev,
libxkbcommon-x11-dev,
libxrender-dev,
libzstd-dev,
pkg-config,
# pkg-kde-tools (>= 0.15.17~),
publicsuffix,
# qt5-qmake-bin <cross>,
unixodbc-dev,
zlib1g-dev,
# =============
# qtdeclarative
# =============
# debhelper-compat (= 13),
# dpkg-dev (>= 1.20.0),
libgl1-mesa-dri,
# pkg-kde-tools (>= 0.15.17~),
python3:any,
# qtbase5-private-dev (>= 5.15.2+dfsg~),
xauth <!nocheck>,
xvfb <!nocheck>,
# ==================
# qtgraphicaleffects
# ==================
# debhelper-compat (= 13),
# dpkg-dev (>= 1.16.1),
# pkg-kde-tools (>= 0.15.26~),
# qml-module-qtquick-window2 (>= 5.15.2+dfsg~),
# qml-module-qtquick2 (>= 5.15.2+dfsg~),
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-dev-tools (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# ============
# qtmultimedia
# ============
# debhelper-compat (= 13),
# libasound2-dev [linux-any],
libgstreamer-plugins-base1.0-dev,
libgstreamer1.0-dev,
libopenal-dev,
# libpulse-dev,
# libqt5opengl5-dev (>= 5.15.2+dfsg~),
# pkg-kde-tools,
# qml-module-qtquick2,
# qml-module-qttest,
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-dev (>= 5.15.2+dfsg~),
# xauth <!nocheck>,
# xvfb <!nocheck>,
# zlib1g-dev,
# =========================
# qtlocation (for qtwebkit)
# =========================
# debhelper-compat (= 13),
libboost-dev,
# libicu-dev,
libprotozero-dev (>= 1.5.2),
# libqt5opengl5-dev (>= 5.15.2+dfsg~),
# pkg-kde-tools,
# qml-module-qttest (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
rapidjson-dev (>= 1.1.0),
# xauth <!nocheck>,
# xvfb <!nocheck>,
# zlib1g-dev,
# ===============
# qtquickcontrols
# ===============
# debhelper-compat (= 13),
# dpkg-dev (>= 1.17.14),
# pkg-kde-tools (>= 0.15.26~),
# qml-module-qt-labs-folderlistmodel (>= 5.15.2+dfsg~),
# qml-module-qt-labs-settings (>= 5.15.2+dfsg~),
# qml-module-qtgraphicaleffects (>= 5.15.2~),
# qml-module-qtqml (>= 5.15.2+dfsg~),
# qml-module-qtqml-models2 (>= 5.15.2+dfsg~),
# qml-module-qtquick-layouts (>= 5.15.2+dfsg~),
# qml-module-qtquick-window2 (>= 5.15.2+dfsg~),
# qml-module-qttest (>= 5.15.2+dfsg~),
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-dev-tools (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# xauth <!nocheck>,
# xvfb <!nocheck>,
# ========================
# qtsensors (for qtwebkit)
# ========================
# debhelper-compat (= 13),
# pkg-kde-tools,
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-dev (>= 5.15.2+dfsg~),
# xauth <!nocheck>,
# xvfb <!nocheck>,
# ================
# qtquickcontrols2
# ================
# debhelper-compat (= 13),
# dpkg-dev (>= 1.16.1),
# pkg-kde-tools (>= 0.15.29~),
# qml-module-qtgraphicaleffects (>= 5.15.2~),
# qml-module-qtquick-layouts (>= 5.15.2+dfsg~),
# qml-module-qtquick-window2 (>= 5.15.2+dfsg~),
# qml-module-qttest (>= 5.15.2+dfsg~),
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-dev-tools (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# xauth <!nocheck>,
# xvfb <!nocheck>,
# =====
# qtsvg
# =====
dbus,
# debhelper-compat (= 13),
# dpkg-dev (>= 1.17.14),
# libqt5opengl5-dev (>= 5.15.2+dfsg~),
# pkg-kde-tools (>= 0.15.17),
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# zlib1g-dev,
# =======
# qttools
# =======
# debhelper-compat (= 13),
libclang-dev (>= 1:3.9~) [amd64 arm64 armel armhf hurd-i386 i386 mips mips64 mips64el mips64r6 mips64r6el mipsel mipsr6 mipsr6el powerpc ppc64 ppc64el riscv64 s390x sparc64],
# libqt5opengl5-dev (>= 5.15.2+dfsg~),
# libqt5sql5-sqlite (>= 5.15.2+dfsg~),
# libqt5webkit5-dev (>= 5.212.0~alpha4-8~) [alpha amd64 arm64 armel armhf i386 mips64el mipsel ppc64 ppc64el riscv64 s390x sh4 x32],
llvm-dev (>= 1:3.9~) [amd64 arm64 armel armhf hurd-i386 i386 mips mips64 mips64el mips64r6 mips64r6el mipsel mipsr6 mipsr6el powerpc ppc64 ppc64el riscv64 s390x sparc64],
# pkg-kde-tools,
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# zlib1g-dev,
# =========
# qtwayland
# =========
# dbus <!nocheck>,
# debhelper-compat (= 13),
# dpkg-dev (>= 1.17.14),
libegl1-mesa-dev,
libfontconfig1-dev,
# libglib2.0-dev,
# libinput-dev,
# libmtdev-dev [linux-any],
# libudev-dev [linux-any],
libwayland-dev (>= 1.8.0),
libwayland-egl1-mesa | libwayland-egl1,
libxcomposite-dev,
# libxkbcommon-dev (>= 0.2.0),
# libxrender-dev,
# pkg-config,
# pkg-kde-tools,
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-dev:native (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# xauth <!nocheck>,
# xvfb <!nocheck>,
# ============
# qtwebchannel
# ============
# debhelper-compat (= 13),
# libqt5websockets5-dev (>= 5.15.2~),
# pkg-kde-tools,
# qml-module-qttest (>= 5.15.2+dfsg~),
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-dev (>= 5.15.2+dfsg~),
# ===========
# qtwebengine
# ===========
# binutils (>= 2.32-8~),
binutils,
bison,
chrpath,
closure-compiler,
# debhelper-compat (= 13),
flex,
gperf,
khronos-api,
# libasound2-dev [linux-any],
libavcodec-dev (>= 7:3.4.8~),
libavformat-dev (>= 7:3.4.8~),
libavutil-dev (>= 7:3.4.8~),
libcap-dev [linux-any],
# libdbus-1-dev,
# libegl1-mesa-dev,
libevent-dev,
libflac-dev,
# libfontconfig1-dev,
# libgl-dev (>= 1.3) [!armel !armhf],
# libgl1-mesa-dri,
# libgles-dev [armel armhf],
# libglib2.0-dev,
libglu1-mesa-dev [!armel !armhf] | libglu-dev [!armel !armhf],
# libgstreamer-plugins-base1.0-dev,
# libgstreamer1.0-dev,
# libharfbuzz-dev,
# libicu-dev (>= 64~),
# libjpeg-dev,
libjsoncpp-dev,
liblcms2-dev,
libminizip-dev,
libnss3-dev,
# libopus-dev (>= 1.3.1),
libopus-dev,
libpci-dev,
# libpng-dev,
libprotobuf-dev,
# libpulse-dev,
# libqt5opengl5-dev (>= 5.15.2+dfsg~),
# libqt5svg5-dev (>= 5.15.2~),
# libqt5webchannel5-dev (>= 5.15.2~),
libre2-dev,
libsnappy-dev,
# libsqlite3-dev,
libusb-1.0-0-dev,
# libvpx-dev (>= 1.8),
libvpx-dev,
libwebp-dev,
# libx11-xcb-dev,
libxcb-dri3-dev,
# libxcomposite-dev,
libxcursor-dev,
libxdamage-dev,
libxml2-dev,
libxnvctrl-dev,
libxrandr-dev,
# libxrender-dev,
libxslt1-dev,
libxss-dev,
libxtst-dev,
mesa-common-dev,
ninja-build,
# pkg-config,
# pkg-kde-tools,
protobuf-compiler,
python2 | python,
# qtbase5-dev (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# qtpositioning5-dev (>= 5.15.2+dfsg~),
# qtquickcontrols2-5-dev (>= 5.15.2+dfsg~),
# qttools5-dev (>= 5.15.2~),
re2c,
ruby,
# xauth,
# xvfb,
yasm [amd64 i386],
yui-compressor,
# =======================================
# qtwebkit (currently mainly for qttools)
# =======================================
# bison,
cmake (>= 2.8.12),
# debhelper-compat (= 13),
# flex,
# gperf,
# libfontconfig1-dev,
libgl1-mesa-dev [!armel !armhf] | libgl-dev [!armel !armhf],
libgles2-mesa-dev [armel armhf] | libgles2-dev [armel armhf],
# libglib2.0-dev,
# libglu1-mesa-dev [!armel !armhf] | libglu-dev [!armel !armhf],
# libgstreamer-plugins-base1.0-dev,
# libgstreamer1.0-dev,
libhyphen-dev,
# libicu-dev,
# libjpeg-dev,
# libpng-dev,
# libqt5opengl5-dev (>= 5.15.2+dfsg~),
# libqt5sensors5-dev (>= 5.15.2~),
# libqt5webchannel5-dev (>= 5.15.2~),
# libsqlite3-dev,
# libwebp-dev,
libwoff-dev,
# libxcomposite-dev,
# libxml2-dev,
# libxrender-dev,
# libxslt1-dev,
# ninja-build,
# pkg-config,
# pkg-kde-tools (>= 0.6.4),
# python3:native,
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# qtpositioning5-dev (>= 5.15.2+dfsg~),
# ruby:native,
# xauth <!nocheck>,
# xvfb <!nocheck>,
# ===============================
# qtwebsockets (for qtwebchannel)
# ===============================
# debhelper-compat (= 13),
# pkg-kde-tools,
# qml-module-qtquick2 (>= 5.15.2+dfsg~),
# qml-module-qttest (>= 5.15.2+dfsg~),
# qtbase5-private-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-dev (>= 5.15.2+dfsg~),
# qtdeclarative5-private-dev (>= 5.15.2+dfsg~),
# xauth,
# xvfb,
Package: libqt-jami
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Custom build of Qt framework used by the Jami Qt client.
#!/usr/bin/env bash
QT_JAMI_PREFIX=/usr/lib/libqt-jami
export PATH="${QT_JAMI_PREFIX}/bin:${PATH}"
export LD_LIBRARY_PATH="${QT_JAMI_PREFIX}/lib:${LD_LIBRARY_PATH}"
export PKG_CONFIG_PATH="${QT_JAMI_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export CMAKE_PREFIX_PATH="${QT_JAMI_PREFIX}/lib/cmake:${CMAKE_PREFIX_PATH}"
usr/lib/libqt-jami
debian/libqt-jami-env.sh usr/lib/libqt-jami/bin/
#!/usr/bin/make -f
# -*- makefile -*-
# export DH_VERBOSE = 1
%:
dh $@
override_dh_auto_configure:
./configure \
-opensource \
-confirm-license \
-nomake examples \
-nomake tests \
-prefix "${QT_JAMI_PREFIX}"
override_dh_auto_install:
dh_auto_install -Smakefile -- INSTALL_ROOT=$(CURDIR)/debian/tmp/
#!/usr/bin/env bash
#
# Copyright (C) 2021 Savoir-faire Linux Inc.
#
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This script is used in the packaging containers to build a snap
# package on an ubuntu base distro.
set -e
PKG_DIR="packaging/rules/debian-qt"
if [ -n "${OVERRIDE_PACKAGING_DIR}" ]; then
echo "Using OVERRIDE_PACKAGING_DIR: $OVERRIDE_PACKAGING_DIR"
PKG_DIR="${OVERRIDE_PACKAGING_DIR}"
fi
cache_dir=/opt/ring-contrib
temp_dir=$(mktemp -d)