Creating a Cydia repository

intel Mac & PPC / Page 1 of 2

Updated: February 14, 2009


Cydia is a third party distribution system for installing programs onto jailbroken iPhones. It is similar to Apple's own App Store, except the overwhelming majority of programs on it are free. This tutorial will show you how to create your own repository (or repo) and package your own applications, graphics, and audio files for distribution. Someone would simply have to enter your URL to your repository, and they would have access to any files or programs you put into it.





This tutorial would not have been possible had I not stumbled onto a tutorial over at ModMyi.com here. All I did was change the way some things were performed in that tutorial. So a big thank you goes out to "itouchr".

Saurik (the creator of Cydia), has a tutorial on how to create a Cydia repository. It is meant for programmers as it assumes working knowledge of Debian and package management. That article is here.


This tutorial is a two part tutorial.

Section 1: Creating a Cydia repository and adding your first package - an application (continue reading below).
Section 2: Adding your second package - a theme.



Step 1.

Download Fink here. Make sure to pick the version that applies to you.

Install Fink.

iPhone




Step 2.

Download DS_Store Cleaner version 1.5 from Ryan Grier's Projects website here. When you double click the downloaded file, it will place the application on your desktop.

iPhone



You'll want to put this in your Applications folder on your Mac. Then launch the application, and keep it in the bacgkround. We'll be using this program a couple times throughout this tutorial.



Step 3.

Create a folder on your desktop called MyProgram.

iPhone



Create folders called Applications and DEBIAN inside the MyProgram folder.

Note: I'm installing a program in this tutorial. In another tutorial I will demonstrate how to install a theme. All programs must go into the folder called Applications. This is because the contents of the Applications folder will be installed into the /Applications folder on the iPhone.

iPhone



Now place your application into the Applications folder. In my example I am using a program called MobileTerminal. This program is already on Cydia, but I'm not a programmer so I don't have my own application to make an example with.

iPhone




Step 4.

Go to the Applications folder on your Mac, and launch the program TextEdit.

iPhone



Verify the following preferences are set. In the New Document pane, check the box for Plain text.

iPhone



In the Open and Save pane, uncheck the box for Add ".txt" extension to plain text files.

iPhone



Open a new file. Paste the following text into your file.

Website: http://www.yoursite.com
Maintainer: You.
Name: Name of package.
Package: Bundle identifier.
Section: Where in Cydia it wil appear.
Version: Package version.
Architecture: iphoneos-arm
Description: Information about package.
Sponsor: You. (Make sure to press return after this line. There must be a blank line under this entry!)


My text looked like this after I edited it.

iPhone



Click File, Save As... Name the file control and select Unicode (UTF-8) as the encoding method.

iPhone



Place the control file in your MyProgram/DEBIAN folder.

iPhone





Step 5.

Launch DS_Store_Cleaner. Drag your MyProgram folder into the program.

iPhone



A message will appear confirming the deletion of the hidden .DS_Store files. Anytime you change the contents of your folders, these files are added. It is critical they be removed before generating the .deb file.

iPhone



Step 6.

On your Mac go to your Applications folder, then go into the Utilities folder. Launch the application called Terminal.

iPhone



In the Terminal, enter the following:

cd /Users/your user name/Desktop    Then press enter.

iPhone



Enter the following into the Terminal:

dpkg-deb -b MyProgram    Then press enter. There will be three warning messages about the user-defined fields website, name and sponsor. This is normal.

iPhone



You will also see a file called MyProgram.deb was created, and placed on your desktop.

iPhone




Step 7.

Create a new file with TextEdit. Paste the following text into your file.

Origin: Name of your repository.
Label: What the user will see to go to your repository. This can be the same as Origin.
Suite: stable
Version: 1.0
Codename: stable
Architectures: darwin-arm
Components: main
Description: Description of your repository.

My text looked like this after I edited it.

iPhone



Click File, Save As... Name the file Release and select Unicode (UTF-8) as the encoding method.

iPhone



The Release file will be saved to the desktop.

iPhone




Step 8.

Create a folder called cydiarepo on your desktop.

iPhone



Create a folder inside cydiarepo called debs.

iPhone




Step 9.

Enter the following into the Terminal:

dpkg-scanpackages -m . /dev/null -->Packages    Then press enter.

iPhone



A file called Packages will be saved to your desktop.

iPhone



Go back to the Terminal and enter the following:

gzip -f Packages

iPhone



A file called Packages.gz will be created on the desktop, and the Packages file will disappear.

iPhone



Double click the Packages.gz file to extract the Packages file. Now place the Packages, Packages.gz, and Release files into the cydiarepo folder.

iPhone







Click here to go to page 2.






Return to top of page