How to assign/group scopes based on a role

How can we assign possible client scopes based on a role ? We have a classic RBAC system and each role has its own permissions. We tried to model the permissions as client scopes but it seems there is no relation between roles and client scopes. It is very prone to errors if I have to set the scopes manually and these cannot be determined by the role.