The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

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




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > OS X > Mac Tips, Tricks & Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 11-07-2009, 08:17 PM
What's Jailbreak?
 
Join Date: Sep 2009
Device + Firmware: iPod Touch 3.1.1 Jailbroken
Operating System: Mac OS X 10.6.1
Location: Russia
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to The_Maclover Send a message via Skype™ to The_Maclover
How To Create A Cydia Repository On Mac!! New Tuto

Here’s my REALLY easier-to-understand version. It mirrors Saurik’s aforementioned guide so you can cross-refer to it when necessary. In the tutorial, we will host Something you made (A Winterboard Theme or an App whatever), and needless to say, it comes with no warranty of any kind so make sure you have backups.

After completing the tutorial, you will be able to set up a new repository from scratch in under five minutes.



What you need:
Mac OS X (Tiger, Leopard or Snow leopard.)
Your favorite Text Editor (I use BBEdit and OS X’s TextEdit.)
An iPhone or an iPod touch.
Something you made for Cydia

STEP 1: MAKING A PACKAGE

First, we will create three main folders under your Mac OS X’s WebServer folder to house files for your repository. Unless otherwise specified, all folders and filenames *are* cAse senSitiVe. Please read the previous sentence again before you proceed any further.

The folders are:

[I]/Library/WebServer/Documents/Build/[/I]
This is where you build your theme’s package

/Library/WebServer/Documents/repo/
This is the root folder of your repository

/Library/WebServer/Documents/repo/deb/
This is where you keep the .deb files

Here’s how the resulting folder tree looks like.[/SIZE][/SIZE]

We will package a WinterBoard theme called “Test”(for an app is really similar). First, we will create a few folders to house your Test theme, as follow:

/Library/WebServer/Documents/Build/Test/
This is the root folder of our Theme

/Library/WebServer/Documents/Build/Test/DEBIAN/
This is the folder to keep the “control.” file

/Library/WebServer/Documents/Build/Test/Library/Themes/
This is the folder WinterBoard look for user’s themes

/Library/WebServer/Documents/Build/Test/Library/Themes/Test.theme/
The folder belonging to your Nice theme( it doesn't need anymore to and whit .theme, you can just create a Folder instead)

Now copy the files and folders of your Test theme into the Test.theme folder.

Here’s how the resulting folder tree looks like.

We will now creates a plain text file (open TextEdit and press Shift+Cmd+T) named “control.” and save it in ~/Library/WebServer/Documents/Build/Test/DEBIAN/, the content of which is as follow:

Package: com.you.testtheme
Name: Test Theme
Version: 1.0
Architecture: iphoneos-arm
Description: A brief description of the Test theme. Just keep it one line long, short and sweet.
Homepage: http://www.yoursite.com/
Maintainer: Your Name
Author: Your Name
Section: Themes (Complete)
Depends: This Package needs another package to work correctly (if not delete this line, if yer enter the Bundle ID of the Depend : exemple :com.you.testapp)
Installed-Size: 4935


You can download the sample copy of RuppertGee to edit. The content of the “control.” file is self-explanatory (please refer to Saurik’s aforementioned instructions for in depth detailing) so I will not elaborate. It’s important, however, to note that the key words are (probably) Title case sensitive. Also, Saurik omitted the “Installed-Size” keyword in his instructions but I like to include it. It’s the total size (in kilobytes) of your theme as installed in an iPhone. To find out the size, simply “Get Info” on the “Test.theme” folder. It will be shown in bytes. You’ll divide that figure by 1,024 and omit the resulting decimals.

Be sure to save the file as a plain text file (i.e., no fancy formatting.) For TextEdit, simply select “Make Plain Text” from the “Format” menu first, then proceed to save the file as “control” (do not use the .txt extension.)

We are almost ready to package your Nice theme using a unix command line utility called “dpkg-deb”. “Huh, what’s that?” Well, you can Dpkg Dpkg to find out. Meanwhile, just download and install FINK for your specific Mac OS X’s platform (either Intel or PowerPC) and version (either OS X 10.5, 10.4 or 10.6 (bit more tricky).) After that, you will find “dpkg-deb” in the /sw/bin/ folder. (FINK installs everything in the aforementioned folder only, so you can just delete the folder to “uninstall” FINK should you decide in future that you don’t need it anymore.)

Saurik’s mentioned in his instructions something about extra “._* files” that you must not include in a package and that you have to “export” some environment variables thingy but he forgot to tell you exactly how to do that…. I Will Not forgot!!

Ok, let’s start making a package of your Test theme!

"Btw, packaging a theme into an iPhone .deb file is akin to using pkzip to zip up your theme, except the resulting “zip” includes a “control” info. That is essentially what it is all about! You can, however, do wonderful things to your theme using scripts you keep in the /DEBIAN/ folder, but that advanced feature is beyond the scope of this tutorial. (In future you can grab a copy of Gee Theme Combo’s .deb file to find out how He use bash scripts to make the Gee Themes a miser of expensive flash storage space.)"

1.Fire up your Terminal app.
2.Copy and paste the following command (one at a time) into your Terminal and execute them:
cd /Library/WebServer/Documents/Build/
find . -name .DS_Store -ls -exec rm {} \;


3.(Optional) You will also execute the following additional commands when you are packaging a theme made by a Windows user. Together with the previous command, they get rid of even more unwanted files than the aforementioned Saurik’s method!
find . -name Thumbs.db -ls -exec rm {} \;
find . -name pspbrwse.jbf -ls -exec rm {} \;
find . -name *.pspimage -ls -exec rm {} \;

4.Alright, we can start packaging the Test theme using “dpkg-deb”, as follows:
cd /Library/WebServer/Documents/Build/
dpkg-deb -b Test /Library/WebServer/Documents/repo/deb/TestPackage.deb


You can ignore dpkg-deb’s message about some warnings on the control file.
Momentarily you will find your Test theme’s iPhone .deb named “TestPackage.deb” file in the /Library/WebServer/Documents/repo/deb/ folder!

Congratulations! You have made your package. It’s pretty easy, isn’t it? You are ready to test the Test package you just created.

At this point, you might be wishing you could take a peek inside the .deb package file you just made. And why not? Even though .deb is a Debian/Linux thingy, there are several Mac OS X apps that let you peek inside and even manipulate the content.
One such app is the shareware, BetterZip, publisher of which also offers a Leopard/Snow Leopard - only Quick Look generator for free.



STEP 2 - TESTING THE PACKAGE

Surely you are curious if your Test theme package is well made. So let’s test it by installing it in your iPhone to see if the theme turns out as designed.

Ready?

Upload “TestPackges.deb” to your iPhone’s “/tmp/” folder, and use Cyberduck to login to your iPhone via SSH as the root user. (How to?)
Install MobileTerminal in Cydia
Quit Cydia if it is running.
Copy, paste, and execute the following Terminal command (in MobileTerminal) :
dpkg -i /tmp/nicetheme.deb

You do not need the .deb file anymore after installation. Delete it.
Quit MobileTerminal
Launch WinterBoard and select to use your newly installed Test theme. Return to the Springboard to see if it looks right.
Launch Cydia, and search for “Test theme”. Look at its Cydia listing. Pretty cool eh? Where did all those details came from? The “control.” file, of course! So make any amendments to the “control.” file if necessary. Just make sure you increment the Version keyword by dash 1. That’s “Version: 1.0-1″. Read up on version naming in Saurik’s instructions. It’s not just a fancy number but a critical component where Cydia will decide if a user should upgrade his copy or not! Using a smaller number for a published version will cause strange result! BTW, frequent minute updates to your theme/package is annoying to your fans across the world, and shows you are not a good theme maker and/or a horrible repo host!
Hmm… that’s it for Step 2. If you are hosting for someone else, then email the package for him to test it out; he probably knows better if it installs the way he intended. Tell him it’s just a test package, and that he must remove it via Cydia “Remove” installed package function after testing. Oh, the same applies to you.

That’s it for Step 2, Testing a Package. It is even easier than Step 1 eh?

Now let’s move on to the exciting step of actually creating a repository.


STEP 3 - CREATING A REPOSITORY

We will use a Perl script (“dpkg-scanpackages”) belonging to the FINK package you installed in Step 1 to create an index of packages we host in our repository.

Unfortunately, the supplied copy in FINK is not quite right for Cydia. Please read Saurik’s write-ups on this issue. Do not worry too much about it though because below is my detailed instructions on editing the said “dpkg-scanpackages” for use with Cydia:

Open to edit the “dpkg-scanpackages” file, which is residing in the /sw/bin/ folder. Then,

search for:
‘Description’);

and change it to:
‘Name’, ‘Author’, ‘Homepage’, ‘Icon’, ‘Description’);

Or, you can download and use the RuppertGee's edited copy; put it in the /sw/bin/ folder overwriting the original copy. Grin. I should have told you about the download earlier and saves you the trouble eh?

Okay, let’s go.

Switch back to the Terminal app.
Copy, paste, and execute the following terminal commands, one at a time:
cd /Library/WebServer/Documents/repo/
dpkg-scanpackages deb / > Packages


You will read and ignore the warnings about “Packages in archive but missing from override file”. The result is you will find a plain text index file named “Packages.” in the /Library/WebServer/Documents/repo/ folder.
Next, to reduce bandwidth, the “Packages.” file is compressed using the “bzip2″ command-line utility. To do so, execute the following commands:
bzip2 -fks ~/Sites/repo/Packages

You will get a new file named “Packages.bz2″. Older version of the same, if exists, will be over-written.
Guess what? Technically speaking your Cydia repository is all set to receive its first visitor, but let’s quickly go to Step 4 anyway; it’s a piece of cake.

STEP 4 - REPOSITORY METADATA

Please read Saurik’s instructions on how to write a “Release.” file; it’s clear and concise, and thus pointless for me to reiterate here. I point out, however, although Cydia “… synthesizes information from your URL ….”, it can’t figure out a good “Description” of your Repository. That’s why I see this Step 4 as compulsory instead of optional. Besides, you only need to create the file once, so just do it.

After that, save the plain-text file in /Library/WebServer/Documents/repo/, naming it “Release.”.

And, we-are-done!

Wheeeeee….

STEP 5 - PACKAGE SIGNATURES (Optional)

Yup, Saurik’s Step 5 is really optional, and I’m not going to elaborate on it now

STEP 6 - ADDING THE REPOSITORY

Step 6 is obsolete. Cydia supports addition of new repository sources for quite sometime already!

STEP LUCKY 7 - GOING L-I-V-E!

Web site
I make you create the repository folder to the WebServer of your mac so you don't need to move anything

The source URL of your repository is: http://www.yoursite.com/repo/

That’s it!

Oh, it’s good to have a closed home-based repository so you can test out your packages before uploading them to your web site repository. Whatever erroneous packages you post in your repository have profound effects on the community. Be responsible and always check your packaging. Read the following section for the how-to.

Home Network
If you don’t own a web site, or you just want to run a small home-based repository for your house guests, you can do it with the Mac mini (doesn't need to be mini) in the living room.

Go to System Preferences -> Sharing -> Tick: Web Sharing, and note the address of your computer's Website, which looks something like:

http://192.168.123.2/ or http://10.0.1.4/ if you have an Airport

Append “repo/” to your personal Website address (so it looks like below) and that’s the source URL of your repository.

http://192.168.123.2/repo/

Fire up Cydia and enjoy the glory of successfully hosting your very own Cydia repository on your home network! Your aunt will be very proud of you.

Home-based web site
Had enough fun? Now open your repository to your close and small group of friends. If you use a router for your home network, you must forward port 80 to your Mac. How to do it? Well, read your router’s instructions or google for it. I don’t know your router well.

After forwarding port 80 to your Mac, you need to sign up with a dynamic dns service so that your home-based dynamic IP address becomes a static IP address (in a sense.) I’ve been using DynDNS.com: Free DNS Hosting, E-mail Delivery, and VPS Hosting for almost a decade because their service is free, and my 3 years old NetGear router has build-in support for automatically pinging my current address to update their server! Very cool.

There. You now have your very own Cydia repository that is hosted in the living room Mac mini for the whole world to gain access!

You are officially your neighborhood’s iPhone guru. You rock man! orz

Alright, stop rocking for a moment. I should warn you that unless your “close and small group of friends” can all fit into mum’s MPV, you better not run a home-based repository. Sure, Mac OS X can manage the traffic, but your ISP will probably come screaming at you for violating their Terms of Service! So check with them first.

(If you are in Singapore and subscribe to StarHub Maxonline cable service, don’t even bother trying to host it at home; your incoming port 80 on the big fat green pipe is blocked because you damn steam the 28″ LCD TV free-gift and got suckered into their well acknowledged pathetic service.)

My best suggestion is to sign up with a good hosting company, such as the Oryon Network (link at footer) to host your repository on a proper web site. Afterall, these days it costs peanuts for a basic plan.

Happy hosting and a big thank you to Saurik for creating Cydia™ for Apple® iPhone™ and iPod™ touch!

PS: I create 2 automator apps to automate (huh!) the process #1 is for removing the hidden files and #2 if for updating you repo (dpkg-scanpackages) (in the attached Files)
Attached Files
File Type: zip deb packaging.zip (159.7 KB, 11 views)

Last edited by The_Maclover; 11-07-2009 at 08:59 PM.. Reason: i forgot.... and the app #2 works now!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 11-07-2009, 08:23 PM
cpjr's Avatar
plain jane vanilla (missing 3k posts)
 
Join Date: Jul 2007
Device + Firmware: iPhone 3G[S] White 32GB 3.0 | iPhone 3G White 16GB 2.2.1
Operating System: Alum Macbook 2.4, 4GB Ram, 250GB HDD
Location: ATL
Posts: 7,443
Thanks: 121
Thanked 1,285 Times in 1,139 Posts
Send a message via AIM to cpjr

Thanks for the guide....edited out the advertisement, not allowed per forum rules.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to cpjr For This Useful Post:
The_Maclover (11-07-2009)
  #3  
Old 11-07-2009, 08:57 PM
What's Jailbreak?
 
Join Date: Sep 2009
Device + Firmware: iPod Touch 3.1.1 Jailbroken
Operating System: Mac OS X 10.6.1
Location: Russia
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to The_Maclover Send a message via Skype™ to The_Maclover

ok! sorry i forgot....
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 11-19-2009, 03:59 PM
What's Jailbreak?
 
Join Date: Aug 2009
Device + Firmware: iPod Touch 2G 3.0
Operating System: OS X
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Apps

To package apps instead of Themes, do you just have a "Apps" folder instead of a "Themes" folder?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5  
Old 11-20-2009, 10:15 PM
What's Jailbreak?
 
Join Date: Sep 2009
Device + Firmware: iPod Touch 3.1.1 Jailbroken
Operating System: Mac OS X 10.6.1
Location: Russia
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to The_Maclover Send a message via Skype™ to The_Maclover

you have to name it "Applications" whitout the " ".
But first you need to compile your app for cydia...I don't know how...Google is your best friend!!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > OS X > Mac Tips, Tricks & Mods

Tags
deb, mac, packages, repo, repository

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 02:59 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.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

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