My adaptation of Slackware's pkgtools into Perl instead of sh.