Based on https://toggen.com.au/it-tips/glabels-build-script-for-ubuntu-18/
but with added patch to add collate flag to glabels-batch that is otherwise missing in the last glabels version:
#!/bin/sh
# add sources before
# sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
apt-get install cmake
apt-get -y build-dep glabels
cd $HOME
mkdir build
apt install qtbase5-dev qt5-qmake qttools5-dev qttools5-dev-tools qtwebengine5-dev libqt5svg5-dev libqt5websockets5-dev
# zint from 2.7 removed support for ZBarcode_render function , however older versions cannot compile properly on Ubuntu 22.04 at least...
# 2.6.7 however compiled ok on ubuntu 18.04 and via checkinstall it seems to isntall OK also on 22.04
#cd build && \
# wget https://sourceforge.net/projects/zint/files/zint/2.6.7/zint-2.6.7.tar.gz && \
# tar -xvf zint-2.6.7.tar.gz/download && \
# cd zint-2.6.7.src/ && \
# mkdir build && cd build && \
# cmake .. && make && make install
# even this zint 2.6.7 compiled on bionic did not help to build with zint support
#wget https://spodni.brozkeff.net/index.php/s/QNktwp6LK2y9m3N/download/zint-2.6.7-bionic~brozkeff_amd64.deb
#apt install ./zint-2.6.7-bionic~brozkeff_amd64.deb
# barcode 0.98 from ubuntu 18.04 seem to have the library and works also on 22.04 it seems
apt install texinfo
wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/b/barcode/barcode_0.98+debian-9.1build1_amd64.deb
apt install -y ./barcode_0.98+debian-9.1build1_amd64.deb
apt-mark hold barcode
#cd $HOME/build && \
# wget https://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz && \
# tar xzf barcode-0.98.tar.gz && \
# cd barcode-0.98/ && \
# ./configure && make && \
# make install
cd $HOME/build && \
wget http://ftp.gnome.org/pub/GNOME/sources/glabels/3.4/glabels-3.4.1.tar.xz && \
tar xvf glabels-3.4.1.tar.xz && \
cd glabels-3.4.1/ && \
wget https://patch-diff.githubusercontent.com/raw/jimevins/glabels/pull/45.patch
patch -b -p1 < 45.patch
wget https://patch-diff.githubusercontent.com/raw/jimevins/glabels/pull/76.patch
patch -b -p1 < 76.patch
./configure && \
make && make install && ldconfig
At least now package works with barcode library OK on Ubuntu 22.04.