According to the Game of Thrones TV Series Wikipedia, Varys supported the Targaryens from the start of the series and before, during the rein of the Mad King.
Despite his previous loyalty to the Targaryens, Varys was pardoned by
the new King Robert Baratheon and allowed to keep his position on the
Small Council under the advice of his Hand, Jon Arryn.
One of his jobs was to keep an eye on the movements of the Mad King's
surviving heirs, Viserys and Daenerys Targaryen, and ensure they do
not become a threat to King Robert's reign.
However, as neither the books or the TV series are complete, I do not think we necessarily know Varys' true intent and support reasoning around the OP's question, especially because he does seemingly agree with Robert Baratheon on the assassination of Daenerys during a small council meeting. (Season 1) and because Daenerys behavior & choices, especially some actions taken in season 7, could prove to go against the grain of Varys' [alleged] beliefs.
Here is some Vary's (TV Version) introspection through some of the character's dialogue which mostly suggests his support for Daenerys:
How he feels about supporting the lie of 'false power' of Monarchs of the [Iron] Throne:
“What do we have left, once we abandon the lie? Chaos? A gaping pit waiting to swallow us all.”
About his ambitions (to Tyrion)
“Peace. Prosperity. A land where the powerful do not prey on the powerless… Perhaps. And perhaps we’ve grown so used to horror we assume there’s no other way.”
And [allegedly] what kind of Leadership he desires (again to Tyrion, about Daenerys)
"The Seven Kingdoms need someone stronger than Tommen, but gentler than Stannis. A monarch who could intimidate the High Lords and inspire the people. A ruler loved by millions, with a powerful army, and the right family name… Who said anything about ‘him’?”
However, again I think it's debatable if this is truly where Varys' legions lie, or will continue to lie.
Some other things to consider about his beliefs, loyalty, or undiscovered motivations:
His mysterious ESSOS past:
As Varys finishes his tale, he finally finishes prying the last nail
out of the crate and opens it - revealing none other than the elderly
sorcerer, the same one that castrated Varys so many years ago. He is
still alive but gagged, and was shipped to Varys in the crate. Using
his own life as an example, Varys thus urges Tyrion to be patient, and
his revenge will come to him in time. Varys then closes the lid of the
box again, with the sorcerer still inside. http://gameofthrones.wikia.com/wiki/Varys
It's unclear what exactly happened to the Sorcerer after this point and if it bears any significance on future plots of the series and/or if this Sorcerer is another known or established character throughout either the TV series' or books' histories, but in theory, it could. Especially since the TV series also chose to save Euron Greyjoy for last, whom also *could still pack a punch, depending if he will more ardently live up to his book counterpart. Although an unreliable narrator, the character has relationships to Essos and its magical practitioners.
In addition there is the semi-hostile exchange between Varys' and Melisandre in season 7. There is something rather ironic in way the scene is written, given how Varys feels about those that use magic, when Melisandre, a practitioner of Magic also from the continent of Essos, and someone who believes in Daenerys (and Jon Snow) also, prophesizes Varys' fate.
Passage contains season 7 spoilers
Melisandre says that she will stay away from both Jon and Daenerys as
her days of "whispering in the ears of kings" are over – a direct dig
at Varys's chosen position. Melisandre declares that she has "brought
ice and fire together" and that her work is done. Varys is delighted
to hear that she will depart for Volantis soon, and advises her not to
return to Westeros. Melisandre states that she cannot follow that
advice, as she must return to Westeros once more to face her end: like
Varys, it is her fate to die in Westeros.
And lastly his book counterpart seems to support "a believed to be fake" (by most readers' standards) Targaryen, a character who goes by "Young Griff", whose not been introduced in the TV series. Varys wants to put him on the Iron Throne. But again, the TV series and books are not finished, may end up having some significant variations (which there already are some), and/or it's possible some book plots could still be introduced in the final season. In any case, because of those things, it's unclear if this piece of information matters at all on the TV series.
the Targaryens have magic and Varys fears and loaths magic
I think it would be more accurate to say that Varys hates magic wielders (i.e. those who actively practice it); and that the Targaryens somehow are magically infused. I can't think of a Targaryen that actively wielded or practiced magic - certainly not the currently living ones.