The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats



How To Create A Cydia Repository

From ModMyi - Wiki

This guide is reprinted with permission from its original author, maXimus, which was posted here first.

After spending a lot of time searching the internet for a guide on how to set up a Cydia Repository, and not finding any one thing totally useful, I decide to consolidate everything I learned from my readings and from my conversations with persons familiar with Cydia and/or Debian APT into one easy-to-understand guide. I have tried to make this guide as simple and straight-forward as possible but you need to already have some good computer skills to attempt this.

This guide has 20+ screenshots. Some might say it's too many and some might say it's not enough! Personally, I like screenshots. I prefer to know what I should be seeing rather than to assume what I am doing is correct. Some of the screenshots are from Linux and some are from Windows. I will do my best to alert you as to which is which, but it should be obvious. This thread will be closed for posting but if you have questions or comments, please open a new thread. I will try to update this guide as things progress so feel free to alert me to changes.


You need the following four things for your repository to work: deb folder - contains .deb files (packages) Package file - plain text file with package info Package.gz archive - archive of the Package file Release file - information about the repository


Contents

I. Credits

Jay Freeman (saurik) - http://www.saurik.com - for writing Cydia and writing the first guide on setting up a Cydia repository.

Kyle Matthews (poetic_folly) - ModMyi.com - for showing me how to build .deb files with the iPhone! Who knew the iPhone could do more than make calls!?!?

MrBucket101 - iPhoneModding.com - for teaching me the basics of Linux and for his script-writing skills.

II. Needed before beginning

1. Internet access - the faster the better!

2. A computer with Linux/Ubuntu 8.10 installed - you can partition your hard drive and set up your computer to dual-boot your current operating system and Linux like I did. You could also run it from a virtual machine. Google is your friend on these subjects. I won't get into them here. BTW, I'm using version 8.10.

3. A website - where you have FTP access for hosting the repository.

4. THIS package - it contains files that you will copy to two directories on your Linux machine.

5. Your app or theme - for the purpose of this guide, I will be using a fictitious theme called MyProgram.

6. A fair amount of patience and time!


III. Please read!

How to Host a Cydiaâ„¢ Repository by Jay Freeman (saurik)

IV. Creating the Repo

Step 1

You need to have an app or theme that you want to put on your repo for others to install.

*At this point I am working from Windows 7 although you may work from whatever OS makes you comfortable.

Example 1 In the example below I have created a theme called MyProgram. I have created a folder with the same name which will contain all the files. In that folder is a sub-folder called DEBIAN (all caps). Every app or theme will have this folder. The control file, which we will discuss later, is located here. The other subfolder Library is configured exactly how you want the files to appear on your iPhone. In the following example the iPhone will get a new Phone icon, a new Settings icon, a new dock and finally a new springboard wallpaper.

01a.gif

Example 2 In this example I have created a fictitious app and LaunchDaemon to install on the phone. As you can see, the DEBIAN folder with control file is there as required.

01b.gif

Step 2

The control file is a text file with name and value pairs separated by a colon.
IT IS IMPORTANT TO HIT "ENTER" AT THE END TO HAVE A BLANK LINE ON THE BOTTOM.
When you save the text file, you must remove the ".txt" a the end of the file name if your editor automatically adds it to the file.

02.png

Here are brief descriptions of each field:

  • Package: this is the identifier of the package and should be all lower case. It is similar to the bundleIdentifier in Apple's Info.plist file.
  • Name: the name of your program as seen in Cydia.
  • Version: program version number.
  • Architecture: this will probably always be "iphoneos-arm" if you are writing for firmware 1.2/2.x.
  • Depends: program(s) that need to be installed for your program to work such as "winterboard" if it is a theme.
  • Description: a description of your program (ignored if you use Depiction).
  • Homepage: sends the user to the page of the packager's choice (ignored if you use Depiction).
  • Depiction: this loads a URL into an iframe in place Description and Homepage. You should use this to display custom links and/or screenshots.
  • Maintainer: package builder, person to contact for problems, format "Name <email address>".
  • Author: wrote the software, same format as Maintainer.
  • Sponsor: financial provider for package, format "Name <website>.
  • Section: location in Cydia.

*At this point, I switched over to Linux.

Step 3

Download the zipped archive with the two files to extract to the Desktop.

03.png

Step 4

After extracting the files from the archive, you should have a folder with two files:

dpkg-scanpackages
dpkg-gettext.pl

04.png

Step 5

Now open a Terminal window. In Terminal you'll copy the two files to their respective locations.

05.png

Step 6

Type the following commands ("sudo" is necessary since will need to run as administrator) to copy the dpkg-scanpackages file to the /usr/bin folder and make it executable:

 sudo cp /home/username/Desktop/cydia-repo/dpkg-scanpackages /usr/bin
sudo chmod 0777 /usr/bin/dpkg-scanpackages

06.png

Step 7

Notice that after running the first command, you'll be prompted for your password before continuing to the second.

07.png

Step 8

Type the following commands to copy the dpkg-gettext.pl file to the /etc/perl folder and make it executable:

 sudo cp /home/username/Desktop/cydia-repo/dpkg-gettext.pl /etc/perl
sudo chmod 0777 /etc/perl/dpkg-gettext.pl

08.png

Here is the /usr/bin folder:

09.png

Here is the /etc/perl folder:

10.png

Step 9

Now create a folder called cydia in your home folder (or where ever you want, just be sure to make appropriate changes where necessary).
In that folder, create a sub-folder called apps for your apps and themes and another called upload for files going to your repository.

11.png

Step 10

In the upload sub-folder, create a sub-folder called deb for your packages .deb files.

12.png

Step 11

Place your app or theme in the apps folder.

13.png

Step 12

Open Terminal again and type the following commands to change to the apps directory and build the .deb file:

 cd /home/username/cydia/apps
dpkg -b MyProgram

*You must type the package name exactly as it appears in the name of the directory (capitalization counts).

    • The two warnings are ignored since they are custom fields that will show up in Cydia.

14.png

Browse to your apps folder and you will see the newly created .deb file:

15.png

Step 13

Move the .deb file to the /home/username/cydia/upload/deb sub-folder.

16.png

Step 14

Go back to Terminal and type the following commands to build the Packages file:

 cd /home/username/cydia/upload
dpkg-scanpackages -m . /dev/null >Packages

17.png

Step 15

Browse to the upload folder and you should find your Packages file.

18.png

Step 16

Right-click the Packages file and choose Open with "Text Editor" so you can see the contents of the file. Check that Filename: says ./deb/MyProgram.deb. This is important since it will be the location of your .deb files on your repository.

19.png

Step 17

Right-click the Packages file and choose "Create archive...".
Change the file extension to .bz2 and click Create.

***IT SAYS .gz BUT IT MUST BE .BZ2 TO WORK***

20.png

Now you shoud have a Packages.bz2 archive. You can upload all three files to your website repo easily from Linux.

21.png

*At this point I returned to Windows 7.

Step 18

Create a text file called Release with your repository information.
When you save the text file, you must remove the ".txt" a the end of the file name if your editor automatically adds it to the file.

22.png

Here are brief descriptions of each field:

  • Origin: slightly longer version of your repo name.
  • Label: shorter version of repo name.
  • Suite: should always be "stable".
  • Version: arbitrary version number.
  • Codename: put whatever you want here.
  • Architectures: should always be "iphoneos-arm".
  • Components: should always be "main".
  • Description: a short description of the repo.

Step 19

Upload the Release file to your repository to the same location as the deb folder, Package file and Package.gz archive.

23.png

Step 20

Now you should test your repo in Cydia. Open Cydia and select Manage at the bottom of the screen. Now select Sources, Edit then Add. Here you will put the URL of your repository. Once you've correctly entered the information, click Add Source. If all goes well, your repository will appear in the list of Entered by User!

24.png 25.png

Best of luck!


Go to Top
ModMyI

All times are GMT -6. The time now is 08:40 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Powered by vbWiki Pro 1.3 RC4. Copyright ©2006-2007, NuHit, LLC
Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top