Create your own Cydia Repository on Ubuntu in a few minutes

I’ve created a simple Perl script which automatically builds your .deb files and compiles your Cydia Repository. Never bzip and gzip the ‘Packages’ file in the console again, never calculate and enter the md5 hashes by hand again. Here is a step-by-step tutorial:

Download and install Ubuntu

Download a 32-bit version of Ubuntu on this site. Install it in a virtual machine. I used VMWare Fusion on OS X and VMWare Player on Windows to do this.

Set up your Ubuntu

Simply install it like you would install an operating system. Now download this zip archive. Unzip it and drag it onto your Ubuntu desktop. You now need to install dpkg-scanpackages and dpkg-gettext.pl. To do that, start a terminal, authenticate yourself and navigate to the desktop:

sudo -s
cd Desktop/

Copy dpkg-scanpackages to /usr/bin

cp dpkg-scanpackages /usr/bin

Give it some rights with chmod

chmod 0777 /usr/bin/dpkg-scanpackages

Now do (nearly) the same with gettext.pl

cp dpkg-gettext.pl /etc/perl
chmod 0777 /etc/perl/dpkg-gettext.pl

You need to configure GnuPG. Execute this command, then enter the following.

Important! If you don’t add a new line at the bottom of the file, you will not be able to build it! So just press enter after the section line.

Great, your package is ready. You don’t need to build it by hand, my perl script will take care of this. The only thing you have to do now is copying this folder into your Ubuntu desktop and place it in repo/uncompiled-packages.

Customize your repository

Go the the repo/ folder and open up “Release-Template” with gedit or any other text editor. This file will be used to name your repository and pass a few metadata to Cydia. It also contains MD5 hashes of the three Packages files. Those are generated by my script, you don’t need to do it by hand.

Run the script

Go back to your Ubuntu terminal and make sure you’re in the repo folder. Do this by entering this command which will list every file and directory in your current folder:

ls

If you see a file called “compile-repo”, you’re good to go. If not, navigate back and forth with the “cd”-command.

perl compile-repo

This will compile your repository. To GnuPG encrypt the ‘Release’ file you need to enter the passphrase you defined before. After that, you’re done. Now upload the entire repo folder on a webspace and enter the URL in Cydia!

In case you are an advanced user and are just interested in the perl script:

Apologies for the double comment, but I’m running into problems at the time I run “perl compile-repo”.

I’m getting a few warnings and errors here. I don’t worry as much for the warnings because I read on Saurik’s site that they are to be expected, but I’m certain the errors aren’t supposed to pop up. Here’s an screenshot, showing how I run compile-repo and the specific errors (inside orange rectangles).