From Fedora Project Wiki

I would appreciate yet another example: how to handle a set of private libs in something like /lib[64]/my-app/*.so. After all, it's one of the basic usecases and unfortunately not trivial (since __filter_excludes_from isn't really applicable, see e. g.,

Since you cannot use __filter_excludes_from you have to define the libs in a static list. This is an obvious maintenance headache. There is shell code to verify that the fixed list actually matches what's in the directory, letting build fail if not. But that code is so hairy that I hesitate to recommend it for guidelines.