Skip to content

Commit

Permalink
Reorganize and create rules files
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-reckmann committed Dec 5, 2024
1 parent a8b5b91 commit 213a43a
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 119 deletions.
12 changes: 8 additions & 4 deletions Dockerfile.agnos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
107 changes: 0 additions & 107 deletions userspace/compile-modemmanager.sh

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
55 changes: 55 additions & 0 deletions userspace/debs/compile-modemmanager.sh
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions userspace/debs/ffmpeg_rules
Original file line number Diff line number Diff line change
@@ -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:
7 changes: 7 additions & 0 deletions userspace/debs/libqmi_rules
Original file line number Diff line number Diff line change
@@ -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
54 changes: 54 additions & 0 deletions userspace/debs/modemmanager_rules
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions userspace/debs/qtwayland5_rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/make -f

%:
dh $@

override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

0 comments on commit 213a43a

Please sign in to comment.