From some basic googling, you basically need to convert the files to WAV format using Mplayer, and then convert to OGG using oggenc.
Code:
mplayer -ao pcm -o wavFileName.wav wmaFileName.wma
Code:
oggenc -o oggFileName.ogg wmaFileName.wma
Obviously, to convert wav to ogg you don't need the mplayer step.
For mp3 to ogg, the following looks interesting:
Code:
mpg321 input.mp3 -w - | oggenc -o output.ogg -
I guess the mplayer method above would work for MP3s as well.
Be aware though, that MP3 and OGG are both lossy formats. It is not a good idea to convert from one lossy format to another, since you can lose different parts of the audio and end up with pretty bad results. Basically, OGG throws away some parts of the audio, and MP3 throws away some different parts.
I hope this helps
--Ian