Jump to content

IPB


- - - - -

How To Make Deb Files


7 replies to this topic

#1 Trcx528

    iPhone Pwner

  • Members
  • 3,135 posts
  • iPod touch:iPod touch 4G
  • Mac:MacBook Pro

Posted 06 April 2011 - 02:32 PM

So you made something awesome that you want to share with the iDevice community, but don't know how to go about that.  You see these deb files and think "If only I could make those, that would be perfect," but alas you do not know how.  Well this tutorial is here to change that!

A deb file is Farley simiple to make; It consisted of two parts, the stuff that you want to give everyone, and then a DEBIAN folder.  Let's start:

1) Create a folder, give it any name you want. This folder will need to endup on your ipod so it might just be easiest to create it on there. 
2) Create a subfolder called "DEBIAN" just like that, all caps no quotes.
3) Create a new text file in the DEBIAN folder name it "control" this is what contains the instructions for the packaging.
4) Open up the control file with your favorite text editor and copy and paste this code into it:
Package: com.Your.Identifier
Name: Friendly Package Name 
Version: 1.0
Architecture: iphoneos-arm
Description: Write what it does here
Section: Cydia's category 
 
Hopefully you can figure our what each tag does, Make sure that you do not change the capitalization of any of the tags. 
The 'Package:' tag is string that the os will use to identify this package.  It should look like a backwards web address:
com.something.something

Next the 'Name:' tage is what people will see in cydia, put down what ever you want here
'Version:' This is the version number duh
'Architecture: iphoneos-arm' don't change this, otherwise your package won't install
'Description:' this what users will see as the description of the package in Cydia
'Section:'  This will tell Cydia which category to put your package in, Games, Tweaks, Administration are some examples.  Be sure to use proper capitalization. 


5) Once all of that is done move back to top folder (the folder that has the DEBIAN folder in it) and make some more folders.  Think about this folder as the / folder on your device. Build a folder structure identical to where you want your package to go. if you want it to go in /usr/bin (location for commands) create a folder called usr and a subfolder called bin. Double check your capitalization!
6) Once that is all done move everything to your iDevice if you haven't already, and set the permissions.  If you want to be able to run a program make sure you have the execute permission set.  'chmod 777 file' this  will give everyone complete access to a file read, write, and execute. 
7) Now the last step.  Open up putty or mobile terminal and navigate to the directory that you created then 'cd ..' this will take you to the directory one step above your current directory.  Then run 'dpkg-deb -b foldername outputfilename.deb'

Ignore the warnings that it gives you and wait a few seconds and your all done! Be sure to give it an output file name, otherwise you will have an extra file in your deb file that may conflict with other packages. 

Leave Comments if you have any questions or just want to know more.  Hope that this helps all of you!
~Trcx

#2 Gavin

  • Members
  • 5,840 posts

Posted 06 April 2011 - 02:34 PM

Sick man, this will help me a lot thanks :D

Quote

Complainismo strikes again

#3 Griffen

    Geek

  • Donators
  • 11,391 posts
  • iPod touch:iPod touch 4G, iPod touch 3G, iPod touch 2G
  • iPod:iPod shuffle, iPod nano, iPod classic
  • Apple TV:Apple TV 2G

Posted 06 April 2011 - 02:36 PM

O sweet
Now i can self install things w/o cydia :)
Posted Image

#4 Vonix

    Animation Overlord

  • Members
  • 10,913 posts
  • iPod touch:iPod touch 4G, iPod touch 2G
  • Mac:iMac
  • iPod:iPod nano
  • Apple TV:Apple TV 2G

Posted 06 April 2011 - 03:03 PM

Add screenys of the way the folders should look :3
Posted Image Posted Image

#5 Trcx528

    iPhone Pwner

  • Members
  • 3,135 posts
  • iPod touch:iPod touch 4G
  • Mac:MacBook Pro

Posted 06 April 2011 - 03:10 PM

Here is how the folder structure  should look according to saurik

+- MyProgram
  +- Applications
  |  +- MyProgram.app
  |    +- Info.plist
  |    +- MyProgram
  |    +- icon.png
  +- DEBIAN
  |  +- control
  +- System
      +- Library
        +- LaunchDaemons
            +- com.saurik.MyProgram.plist

He also has a really good tutorial on making debs at http://www.saurik.com/id/7

#6 J#w_C!@w

  • Members
  • 172 posts

Posted 05 January 2012 - 11:46 PM

How do I include pre-requisite deb packages required for my bash script to work?

#7 m33b0

  • Members
  • 3 posts

Posted 19 March 2012 - 08:12 AM

Open up the control file again and add
Build-Depends: package-name (>=version)
#if you need a specific version
Or add
Build-Depends: package-name
#if you want the latest version
Please correct me if I'm wrong. I only know how to create .debs for Debian/Ubuntu (never created [or even jailbroken] my phone) but I imagine it's the same.
Like Linux? Like hax0ring? Visit us at http://weaknetlabs.com. :)

#8 0felex01

  • Members
  • 6,191 posts
  • iPod touch:iPod touch 4G
  • iPad:iPad 2

Posted 19 March 2012 - 12:22 PM

This was 2 months ago.