These are my opinions, other may have better answers.
1) From where should I compile? From master branch or somewhere else?
Tarballs are preferred because they present a working and stable state of the application.
2) In which directory should I clone the repository and compile it?
It depends how do you want to organize your folders. You can create a Build
or Compile
folder in your Home
and put there all source codes you are going to compile.
3) How do I update the package that I built from source?
You have to compile again, even if a library has been updated, because it need to be rebuilt against new changes of the library.
4) Should I delete the cloned repository directory after installing?
I think yes. But you can keep them if you need to rebuild, as explained in 3).
5) How do I remove the compiled package completely and safely?
The package is like a zip archive. eopkg
is an archive file too. In this case you don't have an archive but only the files needed to run the application. They get copied into the right place in the system after sudo make install
.
But the applications developers don't always offer the uninstall
option in the Makefile
. So sometimes you have to manually delete every single file copied in the system. Tracking the files is the job of a package manager.
6) Any tips and advices for building from source?
https://getsol.us/articles/package-management/basics/en/#base-development-tools
After having a bit more experience with using linux and building packages, I will try to contribute to solus in the future by maintaining a package (it may take a while for me to be ready).
That would be cool. Solus have a nice packaging system. Learning to compile from source is the first step.
I started with simple things like themes. Different software have different instructions. Some are already compiled and you have just to copy them proper folders following the instructions of the developer.