Unverified Commit 1451894b authored by Sébastien Blin's avatar Sébastien Blin
Browse files

packaging: add ubuntu 21.04

Change-Id: Id24a6a8b2db26842a16e9ad4bbdbb0c30447bb96
parent 88075abc
FROM ubuntu:21.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y devscripts equivs
# Speed up mk-build-deps
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retries=10 \
git \
autoconf \
automake \
autopoint \
cmake \
libtool \
libdbus-1-dev \
libdbus-c++-dev \
libgnutls28-dev \
libargon2-0-dev \
libcanberra-gtk3-dev \
libclutter-gtk-1.0-dev \
libclutter-1.0-dev \
libglib2.0-dev \
libgtk-3-dev \
libnotify-dev \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm \
nasm \
autotools-dev \
gettext \
libpulse-dev \
libasound2-dev \
libexpat1-dev \
libpcre3-dev \
libyaml-cpp-dev \
libboost-dev \
libxext-dev \
libxfixes-dev \
libspeex-dev \
libspeexdsp-dev \
uuid-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
libswscale-dev \
libavdevice-dev \
libopus-dev \
libudev-dev \
libgsm1-dev \
libjsoncpp-dev \
libmsgpack-dev \
libnatpmp-dev \
libayatana-appindicator3-dev \
libqrencode-dev \
libnm-dev \
libwebkit2gtk-4.0-dev \
libcrypto++-dev \
libva-dev \
libvdpau-dev \
libssl-dev
ADD scripts/build-package-debian.sh /opt/build-package-debian.sh
CMD /opt/build-package-debian.sh
...@@ -104,6 +104,8 @@ if [ -f /etc/os-release ]; then ...@@ -104,6 +104,8 @@ if [ -f /etc/os-release ]; then
ENDTAG="ubuntu_20.04" ENDTAG="ubuntu_20.04"
elif [ "${UBUNTU_CODENAME}" = "groovy" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_20.10" ]; then elif [ "${UBUNTU_CODENAME}" = "groovy" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_20.10" ]; then
ENDTAG="ubuntu_20.10" ENDTAG="ubuntu_20.10"
elif [ "${UBUNTU_CODENAME}" = "hirsute" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_21.04" ]; then
ENDTAG="ubuntu_21.04"
else else
# Distribution is not supported. Don't provide automatic updates. # Distribution is not supported. Don't provide automatic updates.
CAN_ADD_DEB_SOURCE=false CAN_ADD_DEB_SOURCE=false
......
...@@ -16,16 +16,20 @@ endif ...@@ -16,16 +16,20 @@ endif
JAMI_ALL_IN_ONE_PKG_NAME="jami-all" JAMI_ALL_IN_ONE_PKG_NAME="jami-all"
# Bundled packages from contrib # Bundled packages from contrib
BUNDLED_PKGS = .ffmpeg BUNDLED_PKGS=""
ifeq (raspbian_10_armhf,$(findstring raspbian_10_armhf, $(DISTRIBUTION))) ifeq (raspbian_10_armhf,$(findstring raspbian_10_armhf, $(DISTRIBUTION)))
# Raspbian's yaml-cpp lib does not work properly # Raspbian's yaml-cpp lib does not work properly
BUNDLED_PKGS += .yaml-cpp BUNDLED_PKGS="--enable-ffmpeg --enable-yaml-cpp"
# Add host environment variables # Add host environment variables
CMAKE_OPTIONS=-DCHOST=${HOST_ARCH} \ CMAKE_OPTIONS=-DCHOST=${HOST_ARCH} \
-DCMAKE_C_COMPILER=${HOST_ARCH}-gcc \ -DCMAKE_C_COMPILER=${HOST_ARCH}-gcc \
-DCMAKE_CXX_COMPILER=${HOST_ARCH}-g++ \ -DCMAKE_CXX_COMPILER=${HOST_ARCH}-g++ \
-DCMAKE_FIND_ROOT_PATH=/usr/${HOST_ARCH} \ -DCMAKE_FIND_ROOT_PATH=/usr/${HOST_ARCH} \
-DPKG_CONFIG_EXECUTABLE=/usr/bin/${HOST_ARCH}-pkg-config -DPKG_CONFIG_EXECUTABLE=/usr/bin/${HOST_ARCH}-pkg-config
else
ifneq (ubuntu_21.04,$(findstring ubuntu_21.04, $(DISTRIBUTION)))
BUNDLED_PKGS="--enable-ffmpeg" # For ubuntu 21.04 it seems there is massive issues with linking for swscale
endif
endif endif
%: %:
...@@ -45,7 +49,7 @@ override_dh_auto_configure: ...@@ -45,7 +49,7 @@ override_dh_auto_configure:
done done
########################### ###########################
## Ring Daemon configure ## ## Daemon configure ##
########################### ###########################
mkdir -p daemon/contrib/native mkdir -p daemon/contrib/native
cd daemon/contrib/native && \ cd daemon/contrib/native && \
...@@ -61,11 +65,10 @@ override_dh_auto_configure: ...@@ -61,11 +65,10 @@ override_dh_auto_configure:
--disable-sndfile \ --disable-sndfile \
--disable-gsm \ --disable-gsm \
--disable-speexdsp \ --disable-speexdsp \
--disable-natpmp \ --disable-natpmp \
--enable-gnutls && \ --enable-gnutls $(BUNDLED_PKGS) && \
make list && \ make list && \
make -j$(NO_CPUS) V=1 && \ make -j$(NO_CPUS) V=1
make -j$(NO_CPUS) $(BUNDLED_PKGS) V=1
cd daemon && \ cd daemon && \
./autogen.sh && \ ./autogen.sh && \
./configure \ ./configure \
...@@ -82,7 +85,6 @@ override_dh_auto_configure: ...@@ -82,7 +85,6 @@ override_dh_auto_configure:
cmake \ cmake \
-DRING_BUILD_DIR=$(CURDIR)/daemon/src \ -DRING_BUILD_DIR=$(CURDIR)/daemon/src \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Debug \
$(CMAKE_OPTIONS) \ $(CMAKE_OPTIONS) \
.. ..
...@@ -103,7 +105,7 @@ override_dh_auto_configure: ...@@ -103,7 +105,7 @@ override_dh_auto_configure:
override_dh_auto_build: override_dh_auto_build:
####################### #######################
## Ring Daemon build ## ## Daemon build ##
####################### #######################
make -C daemon -j$(NO_CPUS) V=1 make -C daemon -j$(NO_CPUS) V=1
pod2man daemon/man/dring.pod > daemon/dring.1 pod2man daemon/man/dring.pod > daemon/dring.1
...@@ -125,7 +127,7 @@ override_dh_auto_clean: ...@@ -125,7 +127,7 @@ override_dh_auto_clean:
rm -rfv daemon/contrib/tarballs rm -rfv daemon/contrib/tarballs
####################### #######################
## Ring Daemon clean ## ## Daemon clean ##
####################### #######################
if [ -f daemon/contrib/native/Makefile ]; then make -C daemon/contrib/native distclean; fi if [ -f daemon/contrib/native/Makefile ]; then make -C daemon/contrib/native distclean; fi
rm -rfv daemon/contrib/native rm -rfv daemon/contrib/native
......
...@@ -18,16 +18,20 @@ JAMI_CLIENT_PKG_NAME="jami" ...@@ -18,16 +18,20 @@ JAMI_CLIENT_PKG_NAME="jami"
JAMI_DAEMON_PKG_NAME="jami-daemon" JAMI_DAEMON_PKG_NAME="jami-daemon"
# Bundled packages from contrib # Bundled packages from contrib
BUNDLED_PKGS = .ffmpeg BUNDLED_PKGS=""
ifeq (raspbian_10_armhf,$(findstring raspbian_10_armhf, $(DISTRIBUTION))) ifeq (raspbian_10_armhf,$(findstring raspbian_10_armhf, $(DISTRIBUTION)))
# Raspbian's yaml-cpp lib does not work properly # Raspbian's yaml-cpp lib does not work properly
BUNDLED_PKGS += .yaml-cpp BUNDLED_PKGS="--enable-ffmpeg --enable-yaml-cpp"
# Add host environment variables # Add host environment variables
CMAKE_OPTIONS=-DCHOST=${HOST_ARCH} \ CMAKE_OPTIONS=-DCHOST=${HOST_ARCH} \
-DCMAKE_C_COMPILER=${HOST_ARCH}-gcc \ -DCMAKE_C_COMPILER=${HOST_ARCH}-gcc \
-DCMAKE_CXX_COMPILER=${HOST_ARCH}-g++ \ -DCMAKE_CXX_COMPILER=${HOST_ARCH}-g++ \
-DCMAKE_FIND_ROOT_PATH=/usr/${HOST_ARCH} \ -DCMAKE_FIND_ROOT_PATH=/usr/${HOST_ARCH} \
-DPKG_CONFIG_EXECUTABLE=/usr/bin/${HOST_ARCH}-pkg-config -DPKG_CONFIG_EXECUTABLE=/usr/bin/${HOST_ARCH}-pkg-config
else
ifneq (ubuntu_21.04,$(findstring ubuntu_21.04, $(DISTRIBUTION)))
BUNDLED_PKGS="--enable-ffmpeg" # For ubuntu 21.04 it seems there is massive issues with linking for swscale
endif
endif endif
%: %:
...@@ -47,7 +51,7 @@ override_dh_auto_configure: ...@@ -47,7 +51,7 @@ override_dh_auto_configure:
done done
########################### ###########################
## Ring Daemon configure ## ## Daemon configure ##
########################### ###########################
mkdir -p daemon/contrib/native mkdir -p daemon/contrib/native
cd daemon/contrib/native && \ cd daemon/contrib/native && \
...@@ -63,11 +67,10 @@ override_dh_auto_configure: ...@@ -63,11 +67,10 @@ override_dh_auto_configure:
--disable-sndfile \ --disable-sndfile \
--disable-gsm \ --disable-gsm \
--disable-speexdsp \ --disable-speexdsp \
--disable-natpmp \ --disable-natpmp \
--enable-gnutls && \ --enable-gnutls $(BUNDLED_PKGS) && \
make list && \ make list && \
make -j$(NO_CPUS) V=1 && \ make -j$(NO_CPUS) V=1
make -j$(NO_CPUS) $(BUNDLED_PKGS) V=1
cd daemon && \ cd daemon && \
./autogen.sh && \ ./autogen.sh && \
./configure \ ./configure \
...@@ -84,7 +87,6 @@ override_dh_auto_configure: ...@@ -84,7 +87,6 @@ override_dh_auto_configure:
cmake \ cmake \
-DRING_BUILD_DIR=$(CURDIR)/daemon/src \ -DRING_BUILD_DIR=$(CURDIR)/daemon/src \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Debug \
$(CMAKE_OPTIONS) \ $(CMAKE_OPTIONS) \
.. ..
...@@ -105,7 +107,7 @@ override_dh_auto_configure: ...@@ -105,7 +107,7 @@ override_dh_auto_configure:
override_dh_auto_build: override_dh_auto_build:
####################### #######################
## Ring Daemon build ## ## Daemon build ##
####################### #######################
make -C daemon -j$(NO_CPUS) V=1 make -C daemon -j$(NO_CPUS) V=1
pod2man daemon/man/dring.pod > daemon/dring.1 pod2man daemon/man/dring.pod > daemon/dring.1
...@@ -127,7 +129,7 @@ override_dh_auto_clean: ...@@ -127,7 +129,7 @@ override_dh_auto_clean:
rm -rfv daemon/contrib/tarballs rm -rfv daemon/contrib/tarballs
####################### #######################
## Ring Daemon clean ## ## Daemon clean ##
####################### #######################
if [ -f daemon/contrib/native/Makefile ]; then make -C daemon/contrib/native distclean; fi if [ -f daemon/contrib/native/Makefile ]; then make -C daemon/contrib/native distclean; fi
rm -rfv daemon/contrib/native rm -rfv daemon/contrib/native
...@@ -155,7 +157,7 @@ override_dh_clean: ...@@ -155,7 +157,7 @@ override_dh_clean:
override_dh_auto_install: override_dh_auto_install:
######################### #########################
## Ring daemon install ## ## Daemon install ##
######################### #########################
cd daemon && make DESTDIR=$(CURDIR)/debian/$(JAMI_DAEMON_PKG_NAME) install cd daemon && make DESTDIR=$(CURDIR)/debian/$(JAMI_DAEMON_PKG_NAME) install
......
...@@ -244,6 +244,20 @@ def run_generate_all(parsed_args): ...@@ -244,6 +244,20 @@ def run_generate_all(parsed_args):
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default", "options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)", "version": "$(DEBIAN_OCI_VERSION)",
}, },
{
"distribution": "ubuntu_21.04",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "--privileged --security-opt apparmor=docker-default",
},
{
"distribution": "ubuntu_21.04_oci",
"docker_image": "ubuntu_21.04",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_OCI_DSC_FILENAME)",
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)",
},
# Fedora # Fedora
{ {
......
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