I don't know how you want the team to "take control" of the building but you could do /testfor @a[x,y,z,r,team=TeamA] (z, y, and z are the cords of the center of the tower r is the range) then have a redstone comparator that will create a plus based on how many people on a team are in the tower, then you can then add more command blocks on to and edit.
Or if you want to make it were they have to break a block to take control of the tower you can look on my projects page for a CTF system that you can modify to suit your needs
To set spawnpoints you have to do enter: spawnpoint @a[team=(team name)] x y z