diff --git a/docker/Dockerfile_opensuse-leap_15.2 b/docker/Dockerfile_opensuse-leap_15.2 index c1074ead695deda57b55be38a58ca451460d7c4e..4b6faa07e92974b44d3e0c4663e6cb3ab618ab14 100644 --- a/docker/Dockerfile_opensuse-leap_15.2 +++ b/docker/Dockerfile_opensuse-leap_15.2 @@ -26,11 +26,9 @@ RUN zypper --non-interactive up -y && \ libcanberra-devel \ libcurl-devel \ libtool \ - libQt5DBus-devel \ pcre-devel \ yaml-cpp-devel \ libdbus-c++-devel \ - libQt5DBus-devel \ libXext-devel \ libXfixes-devel \ yasm \ @@ -61,32 +59,38 @@ RUN zypper --non-interactive up -y && \ libnma-devel \ libcryptopp-devel \ libdbus-c++-devel \ - libQt5DBus-devel \ libexpat-devel \ gnome-icon-theme-symbolic \ libgsm-devel \ gtk3-devel \ libappindicator-devel \ sqlite-devel \ - libQt5Sql-devel \ - libQt5Gui-devel \ - libQt5Widgets-devel \ - libqt5-qtdeclarative-devel \ - libqt5-qtquickcontrols \ - libQt5Concurrent-devel \ - libQt5QuickControls2-devel \ - libqt5-qtmultimedia-devel \ - libqt5-qtsvg-devel \ - libqt5-qtbase-devel \ - libqt5-qttools \ - libQt5Concurrent-devel \ - libqt5-qtwebengine-devel \ ffmpeg-4-libavutil-devel \ gtk3-devel\ qrencode-devel \ python3-python-dateutil \ - libqt5-linguist-devel \ - libsndfile-devel + libsndfile-devel \ + libdrm \ + gperf \ + bison \ + flex \ + nodejs12 \ + mozilla-nss-devel \ + python-xml \ + libxcb* \ + libxkb* \ + libX11-devel \ + libXrender-devel \ + libfreetype6 \ + xcb-util-image-devel \ + xcb-util-keysyms-devel \ + xcb-util-renderutil-devel \ + xcb-util-wm-devel \ + xorg-x11-devel \ + xz \ + xkeyboard-config \ + libnotify \ + wget RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 50 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 50 diff --git a/docker/Dockerfile_opensuse-tumbleweed b/docker/Dockerfile_opensuse-tumbleweed index 043678ef39ec51069c7771fa4857faef0f7f30a9..2f0dc201c2d3c57cabe286ae36a25b4a80217bb2 100644 --- a/docker/Dockerfile_opensuse-tumbleweed +++ b/docker/Dockerfile_opensuse-tumbleweed @@ -84,7 +84,20 @@ RUN zypper --non-interactive up -y && \ python3-python-dateutil \ libqt5-linguist-devel \ libsndfile-devel \ - evolution-devel + libxcb* \ + libxkb* \ + libX11-devel \ + libXrender-devel \ + libfreetype6 \ + xcb-util-image-devel \ + xcb-util-keysyms-devel \ + xcb-util-renderutil-devel \ + xcb-util-wm-devel \ + xorg-x11-devel \ + xz \ + libnotify \ + xkeyboard-config \ + wget ADD scripts/build-package-rpm.sh /opt/build-package-rpm.sh diff --git a/packaging/rules/rpm/jami-libclient.spec b/packaging/rules/rpm/jami-libclient.spec index 3be46856545114f2c1d28f6cde7524627d4941af..aa54c06f25797bbb29cdd514c695213bc1796c98 100644 --- a/packaging/rules/rpm/jami-libclient.spec +++ b/packaging/rules/rpm/jami-libclient.spec @@ -23,12 +23,6 @@ BuildRequires: NetworkManager-libnm-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qttools-devel %endif -%if %{defined suse_version} -BuildRequires: libQt5Sql-devel -BuildRequires: libQt5Gui-devel -BuildRequires: libqt5-qtbase-devel -BuildRequires: libqt5-qttools -%endif %description This package contains the client library of Jami, a free software for diff --git a/packaging/rules/rpm/jami-libqt.spec b/packaging/rules/rpm/jami-libqt.spec new file mode 100644 index 0000000000000000000000000000000000000000..0441faa9eeba272ce97c07dbbe877b913828649f --- /dev/null +++ b/packaging/rules/rpm/jami-libqt.spec @@ -0,0 +1,47 @@ +%define name jami-libqt +%define version RELEASE_VERSION +%define release 0 + +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +Summary: Library for Jami-qt +Group: Applications/Internet +License: GPLv3+ +Vendor: Savoir-faire Linux +URL: https://jami.net/ +Source: jami-qtlib_%{version}.tar.xz + +# Build dependencies +BuildRequires: autoconf +BuildRequires: make +# QtWebEngine +BuildRequires: bison +BuildRequires: gperf +BuildRequires: flex +BuildRequires: python-xml +%if %{defined suse_version} +BuildRequires: mozilla-nss-devel +%endif + +%description +This package contains Qt libraries for Jami. + +%prep +%setup -n qt-everywhere-src-%{version} + +%build + ./configure \ + -opensource \ + -confirm-license \ + -nomake examples \ + -nomake tests \ + -prefix "%{_libdir}/qt-jami" + make -j2 V=1 + +%install +make -j8 INSTALL_ROOT=%{buildroot} V=1 install + +%files +%defattr(-,root,root,-) +%{_libdir}/qt-jami \ No newline at end of file diff --git a/scripts/build-package-rpm.sh b/scripts/build-package-rpm.sh index 8de91231c28ae0386be85f3bf44bc9c89edde15b..1b7d631e3459419fb406b1db1d9975c4a58bcb5a 100755 --- a/scripts/build-package-rpm.sh +++ b/scripts/build-package-rpm.sh @@ -28,6 +28,7 @@ set -e mkdir -p /opt/ring-project cd /opt/ring-project cp /opt/ring-project-ro/packaging/rules/rpm/* . +rm jami-libqt.spec # Prepare the build tree. rpmdev-setuptree @@ -35,6 +36,48 @@ rpmdev-setuptree # Copy the source tarball. cp /opt/ring-project-ro/jami_*.tar.gz /root/rpmbuild/SOURCES +QT_JAMI_PREFIX="/usr/lib64/qt-jami" +PATH="${QT_JAMI_PREFIX}/bin:${PATH}" +LD_LIBRARY_PATH="${QT_JAMI_PREFIX}/lib:${LD_LIBRARY_PATH}" +PKG_CONFIG_PATH="${QT_JAMI_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" +CMAKE_PREFIX_PATH="${QT_JAMI_PREFIX}/lib/cmake:${CMAKE_PREFIX_PATH}" +QT_MAJOR=5 +QT_MINOR=15 +QT_PATCH=2 + +if [[ "${DISTRIBUTION:0:4}" == "rhel" \ + || "${DISTRIBUTION:0:13}" == "opensuse-leap" ]]; then + + RPM_PATH=/opt/cache-packaging/${DISTRIBUTION}/jami-libqt-${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}-1.x86_64.rpm + + if [ ! -f "${RPM_PATH}" ]; then + mkdir /opt/qt-jami-build + cd /opt/qt-jami-build + cp /opt/ring-project-ro/packaging/rules/rpm/jami-libqt.spec . + + QT_TARBALL_CHECKSUM="3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240" + wget https://download.qt.io/archive/qt/${QT_MAJOR}.${QT_MINOR}/${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}/single/qt-everywhere-src-${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}.tar.xz + + if ! echo -n ${QT_TARBALL_CHECKSUM} qt-everywhere-src-*.tar.xz | sha256sum -c - + then + echo "qt tarball checksum mismatch; quitting" + exit 1 + fi + + mv qt-everywhere-src-${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}.tar.xz /root/rpmbuild/SOURCES/jami-qtlib_${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}.tar.xz + sed -i "s/RELEASE_VERSION/${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}/g" jami-libqt.spec + rpmdev-bumpspec --comment="Automatic nightly release" \ + --userstring="Jenkins <jami@lists.savoirfairelinux.net>" jami-libqt.spec + + rpmbuild -ba jami-libqt.spec + mkdir -p /opt/cache-packaging/${DISTRIBUTION}/ + cp /root/rpmbuild/RPMS/x86_64/jami-libqt* ${RPM_PATH} + fi + rpm --install ${RPM_PATH} + cp ${RPM_PATH} /opt/output + cd /opt/ring-project +fi + # Set the version and associated comment. sed -i "s/RELEASE_VERSION/${RELEASE_VERSION}/g" *.spec rpmdev-bumpspec --comment="Automatic nightly release" \ diff --git a/scripts/make-packaging-target.py b/scripts/make-packaging-target.py index 425c56d86e206e81e4e5fe732c75399a16ba5587..ef4021b6fc6342b8f89516527fa40ed88e2c1322 100755 --- a/scripts/make-packaging-target.py +++ b/scripts/make-packaging-target.py @@ -57,6 +57,7 @@ PACKAGE_%(distribution)s_DOCKER_RUN_COMMAND = docker run \\ -e DISTRIBUTION=%(distribution)s \\ -v $(CURDIR):/opt/ring-project-ro:ro \\ -v $(CURDIR)/packages/%(distribution)s:/opt/output \\ + -v /opt/cache-packaging:/opt/cache-packaging \\ -t $(DOCKER_EXTRA_ARGS) %(options)s \\ $(PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME)