To make a pet package first download the source code want to compile and read any Readme or Install text files for information on how to compile. Typically it goes like this:
./configure --prefix=/usr --libdir=/usr/lib64 make new2dir make install
dir2pet <app name>-x86_64
Before making your package, it is a good idea to strip all of the binaries and any libraries to make them smaller. To do that you cd to the folder that contains any binaries or libraries and do:
strip --strip-unneeded *
This will make them smaller. You can also delete any thing else that is not needed and then make your pet package.