If you install from a repository, there should be fpc-source package that contains the source code of fpc. Install that and point the IDE to the installation directory, it should have at least packages and rtl directories (the full source also contains compiler, ide, utils, etc.)