From 5bb104da3983a60fe2543f182060576e4e642b8d Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Sat, 7 Sep 2024 02:30:21 +0900 Subject: [PATCH 1/3] Use debhelper tools for dependency compilation and packaging --- Dockerfile.agnos | 2 +- userspace/compile-capnp.sh | 16 ++++++++++------ userspace/compile-ffmpeg.sh | 16 ++++++++++------ userspace/compile-qtwayland5.sh | 17 +++++++++-------- 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 79f3b1b9..3d7f794e 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -42,7 +42,7 @@ RUN apt-get -o Dpkg::Options::="--force-overwrite" install -yq \ # ################## # FROM agnos-base AS agnos-compiler -RUN apt-fast update && apt-fast install --no-install-recommends -yq checkinstall +RUN apt-fast update && apt-fast install --no-install-recommends -yq dh-make dpkg-dev # Individual compiling images FROM agnos-compiler AS agnos-compiler-pyqt5 diff --git a/userspace/compile-capnp.sh b/userspace/compile-capnp.sh index 279a516a..ab7172f0 100755 --- a/userspace/compile-capnp.sh +++ b/userspace/compile-capnp.sh @@ -6,11 +6,15 @@ VERSION=1.0.2 wget https://capnproto.org/capnproto-c++-${VERSION}.tar.gz tar xvf capnproto-c++-${VERSION}.tar.gz cd capnproto-c++-${VERSION} -CXXFLAGS="-fPIC -O2" ./configure -make -j$(nproc) +export DEBFULLNAME=comma +export LOGNAME=comma -# remove "--fstrans=no" when checkinstall is fixed (still not fixed in 24.04) -# https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 -checkinstall -yD --install=no --fstrans=no --pkgname=capnproto -mv capnproto*.deb /tmp/capnproto.deb +dh_make --createorig -s -p capnproto_${VERSION} -y + +echo -e "override_dh_auto_configure:\n\tCXX_FLAGS=\"-fPIC -O2\" ./configure" >> debian/rules +echo -e "override_dh_usrlocal:" >> debian/rules + +DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -nc + +mv ../capnproto*.deb /tmp/capnproto.deb diff --git a/userspace/compile-ffmpeg.sh b/userspace/compile-ffmpeg.sh index d007f826..b0b9e0f3 100755 --- a/userspace/compile-ffmpeg.sh +++ b/userspace/compile-ffmpeg.sh @@ -6,15 +6,19 @@ wget https://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2 tar xvf ffmpeg-4.2.2.tar.bz2 cd ffmpeg-4.2.2 +export DEBFULLNAME=comma +export LOGNAME=comma + +dh_make --createorig -s -p ffmpeg_4.2.2 -y + # avoid makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24. # with --disable-htmlpages # --disable-doc works too, disables building documentation completely # https://gist.github.com/omegdadi/6904512c0a948225c81114b1c5acb875 # https://github.com/7Ji/archrepo/issues/10 -./configure --enable-shared --disable-static --disable-htmlpages -make -j$(nproc) +echo -e "override_dh_auto_configure:\n\t./configure --enable-shared --disable-static --disable-htmlpages" >> debian/rules +echo -e "override_dh_usrlocal:" >> debian/rules + +DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -nc -# remove "--fstrans=no" when checkinstall is fixed (still not fixed in 24.04) -# # https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 -checkinstall -yD --install=no --fstrans=no --pkgname=ffmpeg -mv ffmpeg*.deb /tmp/ffmpeg.deb +mv ../ffmpeg*.deb /tmp/ffmpeg.deb diff --git a/userspace/compile-qtwayland5.sh b/userspace/compile-qtwayland5.sh index de335716..71b17cbf 100755 --- a/userspace/compile-qtwayland5.sh +++ b/userspace/compile-qtwayland5.sh @@ -14,13 +14,14 @@ git apply /tmp/agnos/patch-qtwayland-v5.12 # https://stackoverflow.com/a/75855054/639708 ln -s libdl.so.2 /usr/lib/aarch64-linux-gnu/libdl.so -mkdir /tmp/build && cd /tmp/build -qmake /tmp/qtwayland +export DEBFULLNAME=comma +export LOGNAME=comma -export MAKEFLAGS="-j$(nproc)" -make +dh_make --createorig -s -p qtwayland5_5.12.9 -y -# remove "--fstrans=no" when checkinstall is fixed (still not fixed in 24.04) -# # https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 -checkinstall -yD --install=no --fstrans=no --pkgversion="${VERSION}" --pkgname=qtwayland5 --pkgarch=arm64 --replaces=qtwayland5,libqt5waylandclient5,libqt5waylandcompositor5 -mv qtwayland5*.deb /tmp/qtwayland5.deb +echo -e "override_dh_usrlocal:" >> debian/rules +echo -e "override_dh_shlibdeps:\n\tdh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info" >> debian/rules + +DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -nc + +mv ../qtwayland5*.deb /tmp/qtwayland5.deb From ca536cf82dbf863cf47c9e3e9ef04df7363fbffa Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Sat, 7 Sep 2024 02:32:15 +0900 Subject: [PATCH 2/3] [upload] From 6a809bad75219abbd157b2470b6a3ee9918ff524 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Sat, 7 Sep 2024 02:58:00 +0900 Subject: [PATCH 3/3] [upload]