@@ -11,16 +11,37 @@ ENV DEBIAN_FRONTEND=noninteractive
1111
1212# Install base dependencys
1313RUN apt-get update
14- RUN apt-get install -y \
14+ RUN apt-get install -y --no-install-recommends \
1515 devscripts equivs build-essential lintian clang git lsb-release \
1616 python3 gpg dirmngr sudo xauth curl kmod \
17- cppcheck shellcheck --no-install-recommends && \
17+ cppcheck shellcheck && \
1818 apt-get clean
1919
20- # Install linuxcnc dependencys
20+ # Install linuxcnc build dependencys
2121RUN --mount=type=bind,source=.,target=/linuxcnc-src,rw \
2222 cd linuxcnc-src && \
23- .github/scripts/install-deps.sh && \
23+ debian/configure && \
24+ apt-get -y build-dep . && \
25+ apt-get clean
26+
27+ # Install linuxcnc install dependencys
28+ # Needs all debian packages: Build them
29+ # Install them
30+ # Remove the linuxcnc packages selectively
31+ # Mark all autoremove packages as manual, so apt doesn't complain in later build steps
32+ # Remove built packages
33+ # A bit hacky but does the job
34+ RUN --mount=type=bind,source=.,target=/linuxcnc-src,rw \
35+ cd linuxcnc-src && \
36+ debian/configure && \
37+ debuild -us -uc --build=any && \
38+ apt-get install -y --no-install-recommends \
39+ ../linuxcnc-uspace_*.deb \
40+ ../linuxcnc-uspace-dev_*.deb \
41+ ../linuxcnc-uspace-dbgsym_*.deb && \
42+ apt-get purge -y linuxcnc-uspace linuxcnc-uspace-dev linuxcnc-uspace-dbgsym && \
43+ apt-mark manual $(apt-get --dry-run autoremove | grep -Po '^Remv \K [^ ]+' ) && \
44+ rm -f ../linuxcnc*.* && \
2445 apt-get clean
2546
2647# Add a user for linuxcnc with sudo nopasswd
0 commit comments