What is the best way to install programs from source ?

I wanted to try the Ly login manager https://github.com/fairyglade/ly, but I'm not sure how I can install this since it's not like an rpm or a flatpak.

Could it be a solution to make a script that will run at build-time and do the following :
  • install required dependencies for compilation (zig, libc ...)
  • clone the repository
  • compile the programs
  • copy binaries and systemd file to the right folder
Solution
You are looking for Stages
BlueBuild
A stage is a separate image build flow executed in parallel with the main build.
Was this page helpful?