diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 71899ba3..d9736020 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -30,26 +30,30 @@ ENV USER=comma # capnproto FROM agnos-compiler AS agnos-compiler-capnp -COPY ./userspace/compile-capnp.sh /tmp/agnos/ +COPY ./userspace/debs/compile-capnp.sh /tmp/agnos/ RUN --mount=type=cache,target=/root/.ccache,id=capnp,sharing=shared \ /tmp/agnos/compile-capnp.sh # ffmpeg FROM agnos-compiler AS agnos-compiler-ffmpeg -COPY ./userspace/compile-ffmpeg.sh /tmp/agnos/ +COPY ./userspace/debs/compile-ffmpeg.sh /tmp/agnos/ +COPY ./userspace/debs/ffmpeg_rules /tmp/agnos/ RUN --mount=type=cache,target=/root/.ccache,id=ffmpeg,sharing=shared \ /tmp/agnos/compile-ffmpeg.sh # ModemManager FROM agnos-compiler AS agnos-compiler-modemmanager -COPY ./userspace/compile-modemmanager.sh /tmp/agnos/ +COPY ./userspace/debs/compile-modemmanager.sh /tmp/agnos/ +COPY ./userspace/debs/libqmi_rules /tmp/agnos/ +COPY ./userspace/debs/modemmanager_rules /tmp/agnos/ RUN --mount=type=cache,target=/root/.ccache,id=modemmanager,sharing=shared \ /tmp/agnos/compile-modemmanager.sh # qtwayland5 FROM agnos-compiler AS agnos-compiler-qtwayland5 COPY ./userspace/qtwayland/*.deb /tmp/agnos/ -COPY ./userspace/compile-qtwayland5.sh /tmp/agnos/ +COPY ./userspace/debs/compile-qtwayland5.sh /tmp/agnos/ +COPY ./userspace/debs/qtwayland5_rules /tmp/agnos/ COPY ./userspace/qtwayland/patch* /tmp/agnos/ RUN --mount=type=cache,target=/root/.ccache,id=qtwayland5,sharing=shared \ /tmp/agnos/compile-qtwayland5.sh diff --git a/userspace/compile-modemmanager.sh b/userspace/compile-modemmanager.sh deleted file mode 100755 index bee3ef0c..00000000 --- a/userspace/compile-modemmanager.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash -set -e - -MM_VERSION="1.22.0" -LIBQMI_VERSION="1.34.0" - -cd /tmp - -# libqmi -apt-get update && apt-get install -yq --no-install-recommends \ - bash-completion \ - gobject-introspection \ - gtk-doc-tools \ - help2man \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libgudev-1.0-dev \ - meson \ - ninja-build \ - -git clone -b $LIBQMI_VERSION --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqmi.git -cd libqmi - -dh_make --createorig -s -p libqmi_${LIBQMI_VERSION} -y - -echo -e "override_dh_auto_configure:\n\tdh_auto_configure -- --prefix=/usr --libdir=/usr/lib/aarch64-linux-gnu -Dmbim_qmux=false -Dqrtr=false" >> debian/rules - -dpkg-buildpackage -us -uc -nc - -mv ../libqmi*.deb /tmp/libqmi.deb - -# ModemManager -cd /tmp - -git clone -b $MM_VERSION --depth 1 https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git - -apt-get install -y --no-install-recommends \ - cmake \ - gettext \ - libdbus-1-dev \ - libpolkit-gobject-1-dev \ - libsystemd-dev \ - udev - -apt-get -o Dpkg::Options::="--force-overwrite" install -yq /tmp/libqmi.deb - -cd ModemManager - -dh_make --createorig -s -p modemmanager_${MM_VERSION} -y - - -cat <> debian/rules -override_dh_auto_configure: - dh_auto_configure -- \ - --prefix=/usr \ - --libdir=/usr/lib/aarch64-linux-gnu \ - --sysconfdir=/etc \ - --buildtype=release \ - -Dqmi=true \ - -Dmbim=false \ - -Dqrtr=false \ - -Dplugin_generic=enabled \ - -Dplugin_altair_lte=disabled \ - -Dplugin_anydata=disabled \ - -Dplugin_broadmobi=disabled \ - -Dplugin_cinterion=disabled \ - -Dplugin_dell=disabled \ - -Dplugin_dlink=disabled \ - -Dplugin_fibocom=disabled \ - -Dplugin_foxconn=disabled \ - -Dplugin_gosuncn=disabled \ - -Dplugin_haier=disabled \ - -Dplugin_huawei=disabled \ - -Dplugin_intel=disabled \ - -Dplugin_iridium=disabled \ - -Dplugin_linktop=disabled \ - -Dplugin_longcheer=disabled \ - -Dplugin_mbm=disabled \ - -Dplugin_motorola=disabled \ - -Dplugin_mtk=disabled \ - -Dplugin_nokia=disabled \ - -Dplugin_nokia_icera=disabled \ - -Dplugin_novatel=disabled \ - -Dplugin_novatel_lte=disabled \ - -Dplugin_option=disabled \ - -Dplugin_option_hso=disabled \ - -Dplugin_pantech=disabled \ - -Dplugin_qcom_soc=disabled \ - -Dplugin_quectel=enabled \ - -Dplugin_samsung=disabled \ - -Dplugin_sierra_legacy=disabled \ - -Dplugin_sierra=disabled \ - -Dplugin_simtech=disabled \ - -Dplugin_telit=disabled \ - -Dplugin_thuraya=disabled \ - -Dplugin_tplink=disabled \ - -Dplugin_ublox=disabled \ - -Dplugin_via=disabled \ - -Dplugin_wavecom=disabled \ - -Dplugin_x22x=disabled \ - -Dplugin_zte=disabled -EOF -sed -i 's/^ /\t/' debian/rules - -dpkg-buildpackage -us -uc -nc - -mv ../modemmanager*.deb /tmp/modemmanager.deb diff --git a/userspace/compile-capnp.sh b/userspace/debs/compile-capnp.sh similarity index 100% rename from userspace/compile-capnp.sh rename to userspace/debs/compile-capnp.sh diff --git a/userspace/compile-ffmpeg.sh b/userspace/debs/compile-ffmpeg.sh similarity index 58% rename from userspace/compile-ffmpeg.sh rename to userspace/debs/compile-ffmpeg.sh index e043cb71..62d8fb0a 100755 --- a/userspace/compile-ffmpeg.sh +++ b/userspace/debs/compile-ffmpeg.sh @@ -29,13 +29,7 @@ cd ffmpeg-${VERSION} dh_make --createorig -s -p ffmpeg_${VERSION} -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 -echo -e "override_dh_auto_configure:\n\t./configure --enable-shared --disable-static --disable-htmlpages" >> debian/rules -echo -e "override_dh_usrlocal:" >> debian/rules +cp /tmp/agnos/ffmpeg_rules debian/rules dpkg-buildpackage -us -uc -nc diff --git a/userspace/debs/compile-modemmanager.sh b/userspace/debs/compile-modemmanager.sh new file mode 100755 index 00000000..fe2e7ae5 --- /dev/null +++ b/userspace/debs/compile-modemmanager.sh @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +MM_VERSION="1.22.0" +LIBQMI_VERSION="1.34.0" + +cd /tmp + +# libqmi +apt-get update && apt-get install -yq --no-install-recommends \ + bash-completion \ + gobject-introspection \ + gtk-doc-tools \ + help2man \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libgudev-1.0-dev \ + meson \ + ninja-build \ + +git clone -b $LIBQMI_VERSION --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqmi.git +cd libqmi + +dh_make --createorig -s -p libqmi_${LIBQMI_VERSION} -y + +cp /tmp/agnos/libqmi_rules debian/rules + +dpkg-buildpackage -us -uc -nc + +mv ../libqmi*.deb /tmp/libqmi.deb + +# ModemManager +cd /tmp + +git clone -b $MM_VERSION --depth 1 https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git + +apt-get install -y --no-install-recommends \ + cmake \ + gettext \ + libdbus-1-dev \ + libpolkit-gobject-1-dev \ + libsystemd-dev \ + udev + +apt-get -o Dpkg::Options::="--force-overwrite" install -yq /tmp/libqmi.deb + +cd ModemManager + +dh_make --createorig -s -p modemmanager_${MM_VERSION} -y + +cp /tmp/agnos/modemmanager_rules debian/rules + +dpkg-buildpackage -us -uc -nc + +mv ../modemmanager*.deb /tmp/modemmanager.deb diff --git a/userspace/compile-qtwayland5.sh b/userspace/debs/compile-qtwayland5.sh similarity index 92% rename from userspace/compile-qtwayland5.sh rename to userspace/debs/compile-qtwayland5.sh index 56f64f54..a330e953 100755 --- a/userspace/compile-qtwayland5.sh +++ b/userspace/debs/compile-qtwayland5.sh @@ -42,7 +42,7 @@ ln -s libdl.so.2 /usr/lib/aarch64-linux-gnu/libdl.so dh_make --createorig -s -p qtwayland5_${VERSION} -y -echo -e "override_dh_shlibdeps:\n\tdh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info" >> debian/rules +cp /tmp/agnos/qtwayland5_rules debian/rules dpkg-buildpackage -us -uc -nc diff --git a/userspace/debs/ffmpeg_rules b/userspace/debs/ffmpeg_rules new file mode 100644 index 00000000..05106c28 --- /dev/null +++ b/userspace/debs/ffmpeg_rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# 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 +override_dh_auto_configure: + ./configure --enable-shared --disable-static --disable-htmlpages + +override_dh_usrlocal: \ No newline at end of file diff --git a/userspace/debs/libqmi_rules b/userspace/debs/libqmi_rules new file mode 100644 index 00000000..86dd118a --- /dev/null +++ b/userspace/debs/libqmi_rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- --prefix=/usr --libdir=/usr/lib/aarch64-linux-gnu -Dmbim_qmux=false -Dqrtr=false \ No newline at end of file diff --git a/userspace/debs/modemmanager_rules b/userspace/debs/modemmanager_rules new file mode 100644 index 00000000..a454ddae --- /dev/null +++ b/userspace/debs/modemmanager_rules @@ -0,0 +1,54 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- \ + --prefix=/usr \ + --libdir=/usr/lib/aarch64-linux-gnu \ + --sysconfdir=/etc \ + --buildtype=release \ + -Dqmi=true \ + -Dmbim=false \ + -Dqrtr=false \ + -Dplugin_generic=enabled \ + -Dplugin_altair_lte=disabled \ + -Dplugin_anydata=disabled \ + -Dplugin_broadmobi=disabled \ + -Dplugin_cinterion=disabled \ + -Dplugin_dell=disabled \ + -Dplugin_dlink=disabled \ + -Dplugin_fibocom=disabled \ + -Dplugin_foxconn=disabled \ + -Dplugin_gosuncn=disabled \ + -Dplugin_haier=disabled \ + -Dplugin_huawei=disabled \ + -Dplugin_intel=disabled \ + -Dplugin_iridium=disabled \ + -Dplugin_linktop=disabled \ + -Dplugin_longcheer=disabled \ + -Dplugin_mbm=disabled \ + -Dplugin_motorola=disabled \ + -Dplugin_mtk=disabled \ + -Dplugin_nokia=disabled \ + -Dplugin_nokia_icera=disabled \ + -Dplugin_novatel=disabled \ + -Dplugin_novatel_lte=disabled \ + -Dplugin_option=disabled \ + -Dplugin_option_hso=disabled \ + -Dplugin_pantech=disabled \ + -Dplugin_qcom_soc=disabled \ + -Dplugin_quectel=enabled \ + -Dplugin_samsung=disabled \ + -Dplugin_sierra_legacy=disabled \ + -Dplugin_sierra=disabled \ + -Dplugin_simtech=disabled \ + -Dplugin_telit=disabled \ + -Dplugin_thuraya=disabled \ + -Dplugin_tplink=disabled \ + -Dplugin_ublox=disabled \ + -Dplugin_via=disabled \ + -Dplugin_wavecom=disabled \ + -Dplugin_x22x=disabled \ + -Dplugin_zte=disabled diff --git a/userspace/debs/qtwayland5_rules b/userspace/debs/qtwayland5_rules new file mode 100644 index 00000000..83e92eca --- /dev/null +++ b/userspace/debs/qtwayland5_rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_shlibdeps: + dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info