add pkgdir support