If you really want to build by yourself and without the Docker build environment.
The following steps where working at my system.
clone repo
go to buildscripts\infrastructure\build-nodes
select the system where you build your packages
inside the Dockerfile you find all dependencies needed to build the package
In the root of your git clone
make setup
--> installs many packages
apt install alien postgresql-server-dev-all libjpeg-dev zlib1g-dev
<- was missing after make setup
edit the files - remove the enterprise includes
/build/checkmk/web/htdocs/themes# find . -name "theme.scss"
./modern-dark/theme.scss
./facelift/theme.scss
./classic/theme.scss
touch ./agents/windows/check_mk.user.yml
make dist
--> takes some time :)
make deb
--> takes again some time