Results 1 to 14 of 14

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: How To Create A Cydia Repository On Mac!! New Tuto

  1. #1
    Talking 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 <[email protected]>
    Author: Your Name <[email protected]>
    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 [ame="http://en.wikipedia.org/wiki/Dpkg"]read this wiki[/ame] 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 Attached Files
    Last edited by The_Maclover; 11-07-2009 at 08:59 PM. Reason: i forgot.... and the app #2 works now!

  2. #2
    plain jane vanilla (post count restored to FULL AWESOMENESS) cpjr's Avatar
    Join Date
    Jul 2007
    Location
    ATL
    Posts
    11,685
    Thanks
    181
    Thanked 1,461 Times in 1,264 Posts

    Thanks for the guide....edited out the advertisement, not allowed per forum rules.

  3. The Following User Says Thank You to cpjr For This Useful Post:

    The_Maclover (11-07-2009)

  4. #3
    ok! sorry i forgot....

  5. #4
    Default Apps
    To package apps instead of Themes, do you just have a "Apps" folder instead of a "Themes" folder?

  6. #5
    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!!

  7. #6
    Great info, thanks

  8. #7
    if you create a repo and you have a domain post it here so everyones could see it!

  9. #8
    Default Help!
    Hi!

    I am having problem with packaging a theme into the .deb, whenever i reach the Terminal Step:

    "dpkg-deb -b Test /Library/WebServer/Documents/repo/deb/TestPackage.deb"

    I get this Message from the Terminal (after the 3 warnings):

    "/sw/bin/dpkg-deb: subprocess tar -cf killed by signal (Illegal instruction)"

    And everytime the .deb file comes out Zero KB!!!?!?

    Why is this??????

    I am using Snow leopard OS and have installed Fink.

    PLEASE HELP ME WITH THIS ISSUE!>!>!

    Thanks...

  10. #9
    Hey guys check out my repo. Still a work in progress but lookin pretty good so far. Couple themes i made and other stuff. I gotta finish i was in a rush to get it up. but ya anyhow here it is

    http://freedomforiphone.com/Documents

    Thanx 4 the guide

  11. #10
    Geeker, do you install Fink using the command line?
    go there maybe it could help you re-installing (I recommed it!) :Fink - Source Release Download

    PS. my repo : "repo.themaclover.com/" (whitout the "") BUT my website is VERY weak so download only one thing/day only it will screw up!! :S

  12. #11
    My repo is a work in progress but here it is:
    Index of /repo

    BTW how do you post screen shots and observe download stats?
    My Favorite Part of being an Evil Genius:

    Getting the guy with Metal Teeth....
    Metal Hands....
    and a robotic body
    Through Airport Security.... DAMN YOU TSA!!!

  13. #12
    My iPhone is a Part of Me mvveelen's Avatar
    Join Date
    Jan 2009
    Location
    The Netherlands (Hoorn NH)
    Posts
    638
    Thanks
    100
    Thanked 605 Times in 373 Posts

    I've tried this tutorial (thanks), and it shows up on Cydia. It even let's me download the theme and install it. It shows up in Winterboard (and I can see it in iFunBox), but when I activate the theme it doesn't show up....?

    The dir-structure is exactly the same as when I put it on the iPhone manually, so could there be something wrong with the permissions or so ?

    I could use some help in fixing this last step.

    Thanks in advance !

    Found it : the filepermissions were all wrong. Changed that and now it works

  14. #13
    Thanks for the guide

  15. #14
    My iPhone is a Part of Me Rob2G's Avatar
    Join Date
    Oct 2007
    Location
    San Luis Obispo, CA
    Posts
    604
    Thanks
    138
    Thanked 145 Times in 75 Posts

    If you dont want to go through all the setup you can use http://www.myrepospace.com for free, I use it for a private repo and it works pretty well.
    [SIGPIC]

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