How does one mine Namecoins?
The -gen flag actually started a CPU miner process in older versions of the Bitcoin client, before CPU mining became obsolete.

What you're probably thinking was more like bitcoind -server or `bitcoind -server -RPCALLOWIP=192.168.1.* -RPCPORT=8333 which would start a listening Bitcoin server from which a proper miner could obtain getworks. Since namecoind is a direct port of bitcoind with only the DNS-replacement functionality added, the flags are the same. Nothing special or fancy required, just follow any old "how to solo mine" tutorial and replace bitcoind with namecoind.