With an electric mixer in a large bowl, whip the cup of butter until soft. Add the confectioners' sugar a little at a time and whip until fluffy. Add the egg yolks, one at a time, beating after each addition. Add the vanilla and continue whipping for about 5 minutes.
Combine the semolina, baking powder, almonds, and lemon zest in a small bowl. Slowly add the semolina mixture to the butter and sugar, beating to combine thoroughly.
Preheat the oven to 375 degrees F. Butter a 12- by 18-inch glass baking pan. In a medium metal bowl, place the egg whites, salt, and lemon juice and whip with an electric mixer until stiff peaks form. Fold the meringue into the semolina mixture, working fast to combine. Pour the batter into the prepared pan and bake until set, 35 to 40 minutes.
About 15 minutes before the samali is finished baking, prepare the syrup: Combine the granulated sugar and water in a medium saucepan and bring to a boil. As soon as the sugar dissolves, add the spices, zest, and brandy. Reduce the hear to medium-low and simmer until the syrup is viscous, about 10 minutes.
When the samali is baked, pull it out of the oven and reduce the oven temperature to 300 degrees F. Score it into 3-inch square pieces with a sharp paring knife. Pour the warm syrup over the hot samali and place back in the oven. Bake until the syrup is absorbed, another 5 to 7 minutes, and remove from the oven. Let cool and serve.