Files
makronix/docs
lotherk 93aa5bacf2 MCDE: make debian / debian-install -- the desktop as one Debian package
Konrad, 2026-11-22: "i want mcde to support 'make debian' and it'll fully
create and download all required build dependencies and shit and make debian
debian-install would make the deb and all and then even install" and
"inkluding our own motif stuff xyz".

tools/mcde-debian.sh does the three steps in one lock:

  build    installs the build dependencies through apt-get (the ones
           configure.ac stops on and each -dev the tree compiles against),
           builds MCDE from a copy of ext/src/mcde with the path step of
           tools/mcde-host.sh, installs into build/mcde-debian-stage, strips,
           and packs build/mcde-debian/mcde_<version>_<arch>.deb
  install  installs that package
  clean    removes both directories

The package carries its own Motif: libXm, libMrm, libUil, the uil compiler
and the headers live in /usr/mdt, so the desktop runs from its own toolkit
and never from the system's libxm4 (--with-private-motif, as Konrad asked).

Four things cost a run each and are written where they bit:

- dpkg-shlibdeps matches a shlibs line on the SONAME version (libXm.so.4 ->
  4), not on the file version (4.0.4).  With 4.0.4 it ignored the line, found
  the system's libxm4 and put it in Depends.
- -L is the override file dpkg-shlibdeps READS; -T is where it writes the
  substvars it produced.  The first version passed -T and got nothing.
- -x$PKG, or the package depends on itself (every binary links /usr/mdt/lib).
- The version carries the commit, so a rebuild leaves a second .deb beside
  the first and `dpkg -i *.deb' installs both -- the older wins.  One package,
  one file: the old one goes.

debian-mcde/ holds what the package manager cannot do for the desktop: the
control paragraph, a postinst that indexes the fonts MCDE carries under
/usr/mdt/fonts for the X server, and the session entry (Type=XSession,
/usr/share/xsessions/mcde.desktop) -- without it a display manager lists the
host's desktops and not MCDE.

Verified on this host (2026-11-22):
  bmake debian from an empty build/mcde-debian exit=0,
    build/mcde-debian/mcde_0.1.0+git420f66c19e_amd64.deb (42M, 180280 KiB
    installed, 4583 files)
  Depends is free of libxm4/libuil4/libmrm4 and free of mcde itself
  the package carries usr/mdt/lib/libXm.so.4.0.4, libMrm, libUil and the
    uil compiler; /etc/pam.d/dtlogin and dtsession are conffiles
  dpkg -i installs it, postinst runs
  ldd /usr/mdt/bin/dtwm -> /usr/mdt/lib/libXm.so.4 (its own)
  on a private Xvfb: dtsession, dtwm, dtlaunch, dtpad, dtfile and the
    front panel (Applications/Files/Desktop/System/Network) run, no errors
  bmake debian-install exit=0, "mcde 0.1.0+git420f66c19e install ok
    installed", 0 upgraded / 0 newly installed

AGENTS.md and docs/BUILD-CONTRACT.md list mcde-debian.sh among the tools that
need the build lock, next to mcde-host.sh.

t0768
2026-11-22 17:35:17 +00:00
..