I have a project to implement exactly what you're talking about, on 2 levels... it's not really published yet, as I'm sure there's some debugging to be done, and a few things I'm not sure about, but at this point given some prerequisites (such as working wifi, and manual installation of a kernel module which I may have to compile each time there's an updated kernel)...
You can find some minimal documentation and (eventually) installation details at this URL:-
If you want to play around with it, be a guinea pig etc. then please contact me here, or on the email address linked from the documentation that's in the link above.
My tool implements both B.A.T.M.A.N, and CJDNS which are documented here, to provide 2 different types of mesh. One local, a broadcast domain like a LAN, and the other routed like a WAN... both restricted to IPv6 so they don't interact with local internet routers etc:-
The current version also joins the routed meshs together so it extends beyond the range of wireless if there is an internet connection available.
Setup is fairly trivial... there are some packages you need to install first, then if you have both working wireless, and a working batman-adv module (from my site).. then the software consists of a tarball you extract in /opt, and an init script....