Zest the lemon. Cut 4 slices out of the middle of the lemon and reserve for garnish. Squeeze out the juice and set aside.
In a small pan over medium-high heat, stir together the sugar with 1/2 cup water until the sugar dissolves. Bring to a boil, remove from the heat, and add the rosemary sprigs and lemon zest. Let cool to room temperature, strain into a clean jar, and refrigerate until ready to use, or up to 2 weeks.
Fill 4 glasses with ice. Fill each glass three-quarters of the way up with sparkling water. Add splash of lemon juice and 2 tablespoons of the flavored syrup. Top with ouzo or gin, if using. Garnish with a lemon slice and a small sprig of rosemary.