That's pretty easy to do. There are numerous companies that make different flavored soda extracts that are just flavorings. You mix them with sugar and 4-5 gallons of water. To carbonate you can either use yeast in plastic bottles or hook it up to a CO2 tank.
I regularly make root beer this way and put it in my kegerator. I usually put in about half the sugar than what the extract calls for.