Unverified Commit 045ee5bb authored by Sébastien Blin's avatar Sébastien Blin Committed by Maxim Cournoyer
Browse files

rpm: add jami-libqt

Change-Id: Ib3e5a459f907928882bd9be4427fafe75f053080
parent 59d2e9a5
......@@ -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
......
......@@ -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
......
......@@ -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
......
%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
......@@ -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" \
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment