Hej, my mother comes from family Tupko (Lithuania). Look for answers in Vilnius and Šalčininkai (Soleczniki). Tupko's usually describe themselves as polish, but before the 2. Second they were living near Vilnius (at the time Lithuania was in Poland). After war some of them run away, because Soviet Union took Lithuania, but some of them stayed there. My mother was born after war in Poland. Some of her close relatives are still living in Lithuania.
She told me that it is high possible, that all Tupko's in the world are relatives somehow, but origanal they don't come from Lithuania, are not even polish, but serbian. I heard a story, that in 18/19th century serbian soldiers in service of Austrian-Empire, were send to Galicja (not in Spain, but south Poland with Cracow). There were also some Tupko's from a serbian village also called Tupko. Few of them started new lives there, I mean in Galicja, but one of them escaped to Lithuania (at that time in Russia Empire - yes I know, complicated history of Lithuania and Poland), and he founded a new family. Well, I heard that he was an Army Officer, but it seems to me more like a family legend. But it's true, that in 19th century existed austrian officers with Tupko's Surname. I can't proof all of this, because I don't know serbian language - they don't use latin alphabet. I only have learned, that tupko could mean even 'dumm', but i'm not sure about it.
PS. sorry for my english skills.
I hope you find your answers