What is the version of the following sentence with correct punctuation?

This magnificent building dates back to the beginning of the 14th century when it was built by Yusef 1 of Granada on a former Phoenician site and lighthouse from which the castles name was derived gebelfaro rock of the lighthouse
This magnificent building dates back to the beginning of the 14th century when it was built by Yusef 1 of Granada on a former Phoenician site and lighthouse from which the castle's name was derived - gebel-faro (rock of the lighthouse).