Couldn't you just do the following using installpkg:
$ for i in `cat packagelist`; do installpkg $i; done
where packagelist contains the filenames of the packages you wish to install (including the .tgz extension), one package per line? If you want to omit the .tgz extension you could do the following:
$ for i in `cat packagelist`; do installpkg $i.tgz; done
You could also specify a directory containing the packages etc. using similar modifications.