A package definition looks something like a Python class definition:
class mypackage(package):
file(Filename('neededfile.dll'))
module('my.python.module')
dir(Filename('/c/my/root_dir'))
In fact, you can put any Python syntax you like into a pdef file, and it will be executed by ppackage. A pdef file is really just a special kind of Python program. The class syntax shown above is just the convention by which packages are declared.
The above sample generates a package called "mypackage", which contains the file neededfile.dll and the Python module my/python/module.py, as well as all files that those two files reference in turn; it also includes all of the contents of c:\my\root_dir .
More details of the pdef syntax will be provided soon. In the meantime, you can also examine the file direct/src/p3d/panda3d.pdef, for a sample file that produces the panda3d package itself (as well as some related packages).
You can also examine the file direct/src/p3d/Packager.py; any method of Packager named do_foo() produces a package function you can call named foo(). For instance, there is a Packager.do_file() method that accepts a Filename (as well as other optional parameters); this method is called when file() appears within a class definition in a pdef file.