Hi branka,
Frankly, I don't know a lot about Mac packaging, but I hope you'll figure everything out with the little hints I can give you.
To build libupnp:
download libupnp-1.6.0 from pupnp.sf.net
./configure --disable-static
make
UPnP support will be compiled by default, you only have to put the libraries (libixml.so.2.0.4 and libupnp.so.3.0.0; you have to rename them or create a symlink to libixml.so.2 and libupnp.so.3 ) at the right place.
This should be aMule.app/Contents/Frameworks.
Now I don't know where Mac will look for the files, but you might try to hack aMule code:
UPnP.cpp
m_LibIXMLHandle("libixml.so.2"),
m_LibUPnPHandle2("libupnp.so.2"),
m_LibUPnPHandle3("libupnp.so.3"),
m_LibUPnPHandle(NULL)
to
m_LibIXMLHandle("../Frameworks/libixml.so.2"),
m_LibUPnPHandle2("../Frameworks/libupnp.so.2"),
m_LibUPnPHandle3("../Frameworks/libupnp.so.3"),
m_LibUPnPHandle(NULL)
Once again, I don't know if this will work with relative paths.