deb is the extension of the Debian software package format and the most often used name for such binary packages. Like the "Deb" part of the term Debian, it originates from the name of Debra, then girlfriend and now ex-wife of Debian's founder Ian Murdock.
Debian packages are standard Unix ar archives that include two tar archives optionally compressed with gzip (zlib), Bzip2, lzma, or xz (lzma2): one archive holds the control information and another contains the program data.
- MobileTerminal or Prompt(Requires OpenSSH to be installed)
Create a working directory, I would suggest creating a folder named debs inside /var/mobile/
Download my sample package below. Copy the sample package to /var/mobile/debs and extract the archive with iFile.
Edit the field values in the control file with your package information. The control file is located /var/mobile/debs/com.sull.sample/DEBIAN/control
Sample control file:
Description: Your description here.
Author: xxx <[email protected]>
Sponsor: xxx <http://xxx.com>
Maintainer: xxx <[email protected]>
In the sample the file structure has been laid out for a Winterboard theme. You can easily change the file structure to suit your package. Just be sure to name each folder inside your package exactly as it appears in the iOS filesystem. Say for example I want to include a ringtone with my theme, the structure of my deb would look like this:
If I want to add a script inside my theme package that would go inside /usr/bin/ I would create the extra folders like so:
*When done editing your control file, go to the end of the last line and press the enter/return key, now save the file. You always have to go to the last line and press enter or you'll run into errors when building.
*Depends: This field is only necessary in your control file if your package depends on another package to function properly, in the sample above the package depends on Winterboard because it's a winterboard theme. If your creating a dreamboard package you would have the depends field value looking like this Depends: com.wynd.dreamboard now remember you can easily find package identifiers within cydia, go to any package you wish to make your package depends on, scroll down and look for the ID, usually starts with com.bigboss, com.modmyi, com.sull, etc etc.
*Do not leave fields with empty values in your control file. If your package does not depend on any other package to function, simply remove the field Depends: from your control file.
Building your package into a deb:
You should be ready to build your deb package now. Open up MobileTerminal or some other command line alternative.
The first command su is going to give you root privliges and you'll be asked to type your password, alpine is your default root password if you have not changed it. second command cd is going to put you inside the debs directory. third command is going to build com.sull.sample into a deb file.
dpkg -b com.sull.sample
You can ignore these warnings they are completely normal.
warning, `com.sull.sample/DEBIAN/control' contains user-defined field `Name'
warning, `com.sull.sample/DEBIAN/control' contains user-defined field `Author'
warning, `com.sull.sample/DEBIAN/control' contains user-defined field `Sponsor'
dpkg-deb: ignoring 3 warnings about the control file(s)
Sample DEB File
com.sull.sample.zip 1.17KB 130 downloads