Store the locales list as a Lua table in the spec file. Add Lua code and a new Python script, parse-SUPPORTED.py, to compute a common representation from it.
All of the useful glibc maintainer scripts are located at: https://pagure.io/glibc-maintainer-scripts