I am writing a spec file which creates multiple packages. Can I use a for loop over %files directive with different names, like this:
for name in {package1, package2, package3} ; do
%files -n $name
%attr(644, root, root) /etc/systemd/system/$name.service
done