Default How do I make a flashable zip?

I have a some settings and a few apps I'd like to have immediately at first boot. Most importantly, I have a horrible case of the soft key ghost problem, so the first thing I do after installing or updating a ROM is: turn on airplane mode, install UDN lite to add on-screen soft keys, disable the soft keys by editing /system/usr/keylayout/Sec_touckey.kl, then reboot.

So, is there a guide on how to create a zip to flash these things? Is it different from phone to phone or ROMs?
Virgin Mobile Galaxy S2 SPH-D710VMUB (CM11 nightly 2014.09.11, FL26 modem)