You create the subdirectories yourself in %install
or wherever.
Example: You want to install all your files in /opt/mypkg/
but also want a config file /etc/mypkg.conf
. So in the %install
section you:
mkdir -p %{buildroot}/opt/mypkg
mkdir -p %{buildroot}/etc
So you are re-creating the tree that you want installed, all with %{buildroot}
as the equivalent of the target's /
.