support pkg in resourcemap