Active Topics

 


Reply
Thread Tools
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#1
I recently went through the process of learning how to package a *.deb file for the N9. At the request of a fellow user (Schturman), I will share how I did it.
NOTE: I have only packaged a binary, so if you want to package an app, there are further steps that I have not learnt. If whatever you want to package doesnt have dependencies, then as far as I know these steps will work for you.


(Thanks to Niwakame & nicolai for helping me accomplish this )




Firstly, what you will need:

- PC running Windows (from your local electronics/computer store )
- Oracle VM Virtualbox software (https://www.virtualbox.org/wiki/Downloads)
- Ubuntu OS *.iso (http://www.ubuntu.com/download/ubuntu/download)
- USB stick (for transferring files to and from Virtual Ubuntu PC.)
- Something to package



Okay, so what now?!
Let's setup your Virtual Ubuntu PC.


1. Install Oracle VM Virtual box. Use default settings.
2. Run it and click the NEW button.
3. Name your machine "Ubuntu". Leave other settings. Click "Next".
4. Memory size. I left it default as my PC is ****. Click "Next".
5. Startup disk size, 20GB Click "Next".
6. Leave as VDI. Click "Next".
7. Dynamic. Click "Next".
8. Leave the virtual disk size as is. Click "Next".
9. Click "Create".
10. Wait for ages.
11. Once thats done, select your virtual machine and click "Start".
12. Click "Next".
13. Select the Ubuntu OS *.iso you downloaded by clicking folder icon to the right of the drop-down list. Click "Next".
14. Click "Start".
15. Ubuntu setup will start. Ignore any errors.
16. You will be offered 2 options, select Install Ubuntu.
17. Click "continue".
18. Click install to hard disk (or similar).
19. Click "Install now." Ubuntu will install.
20. During install, you must set location and language, but MOST IMPORTANTLY, you MUST set your username and PASSWORD. Make them both something short and sweet AND NOTE THEM DOWN SOMEWHERE!!! If you are ever asked for a password, you enter the one you created here!



****. Whats next??!!!
Scratchbox setup.


1. Once Ubuntu has booted, you will have a row of icons going down the left hand side. This is the launcher. Click the top icon. (Circle looking thingy). Type "TER". Terminal icons will show. You want the one named "Terminal". Drag it to the launcher and drop it there. You can remove other icons by right clicking. (Recommended). Dont remove Firefox or Home Folder.
2. Start Firefox. Go to "http://harmattan-dev.nokia.com/platform-sdk/". Under downloads, select "Harmattan Platform SDK installer". Save this file to default location.
3. Go back to previous web page and again, under Downloads select "Platform SDK user guide". Under "Downloading and Installing Scrathbox", step 2, select the text in the grey box (minus the $) and copy it. Leave this window open.
4. Start Terminal. Type:
cd /home/*username*/Downloads [press Enter]
Paste the text from clipboard, "chmod +x harmattan-sdk-setup.py". [press Enter]
5. Go back to Firefox, copy text from step 3 (minus the $) "sudo ./harmattan-sdk-setup.py admininstall", go back to Terminal, paste and press Enter key.
6. Follow the prompts to install, leave all settings default. This takes ages too. If theres any errors.... ****. (I had 2 errors the first time, I ran out of HDD space). If no errors, sweet.
7. In top window menu, click Machine > Close > Power off machine.
8. Restart machine. (Select > Start > Wait....)
9. Run Terminal, and type:
/scratchbox/login [press Enter]
sb-menu [press Enter]
10. Press "S" then Enter. (Select "Activate a target)
11. Press Enter again. (Select "ARMEL".) Do not close Terminal.



?????????!!!!
Still with me?! Now we package! And its actually quite easy!


1. Go to your Windows PC, insert your USB stick and put your files onto it, preferably in one folder. To make things easier, make the folders that you want it to install to. For example, I just packaged my Faster Darker Theme. Themes go into /usr/share/themes/. So make the needed folders, and put your folder/files in their prospective places. Pretty much, put the files where they need to be installed to.
2. Go to Virtual Ubuntu PC. Down the bottom in the status menu, right click on the USB icon (3rd from left) and select your USB stick. It may not work. If so, go back to Windows, eject it. Then restart the Virtual Ubuntu PC. Then plug in USB stick once booted.
3. Once you can see your USB stick, in the launcher, select Home Folder. Under "Computer" on the left, click "File System".
4. Navigate to: "scratchbox/users/*username*/home/*username*/". This is your base for packaging.
5. Create a folder, and use your apps name with version number. E.G. "fasterdarkertheme-3.3". Do NOT use spaces. Copy your folder(s) across into this folder.
6. Go into this folder. Create a folder named "DEBIAN" (MUST be CAPITALS). Right click > Create new document > Empty document. Name it "control". (No extension, all lower caps).
7. Inside this document, you need this info: (Obviously you will change it for your app. DONT CHANGE architechture or XB-Maemo-Flags. At this stage I do not know the Sections used under "Section".)
Package: faster-darker-theme
Version: 3.3
Architecture: armel
Description: My 1337 theme for you! It's simple and dark xD
Maintainer: F2thaK <f2thaK@somereallycoolmailprovider.com>
Author: F2thaK <f2thaK@somereallycoolmailprovider.com>
Section: user/Utilities+
XB-Maemo-Flags: visible
XB-Maemo-Display-Name: Faster Darker Theme
Homepage: http://F2thaK.com
8. Go back to Terminal, and type:
cd /home/*username*/ [press Enter]
fakeroot dpkg -b *nameofyourappsfolder* [press Enter]
9. You will be prompted for your password. Enter it and press enter. Your packag will be created if all is correct. I get 3 errors but theyre not anything to worry about (AFAIK).
10. Back in the file explorer, under "scratchbox/users/*username*/home/*username*/", your *.deb should be sitting there. Copy it to your USB, close Virtual Ubuntu PC, go back to Windows, copy it off and upload it so everyone can install it with ease!

Last edited by F2thaK; 2011-12-17 at 03:24.
 

The Following 9 Users Say Thank You to F2thaK For This Useful Post:
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#2
Ive packaged my Faster Darker Theme and its on its way to the Store. Going to do the same for just the Faster Transitions too.
 

The Following User Says Thank You to F2thaK For This Useful Post:
Posts: 23 | Thanked: 11 times | Joined on Nov 2011
#3
thanks, I'm looking for how to compile meamo5 applications source to N9.

Any tutorial ?
 
ammyt's Avatar
Posts: 1,918 | Thanked: 3,118 times | Joined on Oct 2010 @ My pants
#4
Originally Posted by F2thaK View Post
Ive packaged my Faster Darker Theme and its on its way to the Store. Going to do the same for just the Faster Transitions too.
Dude why?
Packaging a deb does not need all that! You're making things veeeerryy difficult!
Packaging any deb can be done via 3 simple steps in the N900 itself!
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#5
Dude. This is for the N9.

 
ammyt's Avatar
Posts: 1,918 | Thanked: 3,118 times | Joined on Oct 2010 @ My pants
#6
Originally Posted by F2thaK View Post
Dude. This is for the N9.

Dude it doesn't matter, this is done the same way in all linux distros.
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#7
 
cddiede's Avatar
Posts: 1,034 | Thanked: 784 times | Joined on Dec 2007 @ Annapolis, MD
#8
Originally Posted by ammyt View Post
Dude it doesn't matter, this is done the same way in all linux distros.
You wouldn't mind posting those three easy steps, would ya?
 

The Following User Says Thank You to cddiede For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#9
Originally Posted by ammyt View Post
Dude why?
Packaging a deb does not need all that! You're making things veeeerryy difficult!
Packaging any deb can be done via 3 simple steps in the N900 itself!
Yeaa.. I also want to know this 3 simple steps.. I still have N900
Thanks
 
ammyt's Avatar
Posts: 1,918 | Thanked: 3,118 times | Joined on Oct 2010 @ My pants
#10
Originally Posted by cddiede View Post
You wouldn't mind posting those three easy steps, would ya?
Why would I?
1. Copy the them folder, e.g. fasterdarker folder to /home/user/
2. Create a Folder inside /home/user/fasterdarker called DEBIAN, and construct the control file in there.
3. Chmod 755 both the DEBIAN folder and the control file, then:
Code:
dpkg-deb -b /home/user/fasterdarker
You will find a file called fasterdarker.deb in /home/user/
I pretty much package everything that way.
 

The Following 3 Users Say Thank You to ammyt For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 02:44.