OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: kurochka on November 09, 2006, 05:20:15 pm

Title: How Do I Make An Ipk?
Post by: kurochka on November 09, 2006, 05:20:15 pm
You can call me a novice Linux user; however, it is not true because I have "used" Linux for about 5-6 years.  I guess I will remain a "user" forever.

With my level in mind, could somebody describe step-by-step how to make an ipk package from the files that I already have on my Zaurus?  For example, a dictionary for Zbedic or a font.

I understand that an ipk is just an archive with some control where to put files and a log what files and where have been installed.  I've searched and could not find an easy tutorial on how to make those ipks.
Title: How Do I Make An Ipk?
Post by: Capn_Fish on November 09, 2006, 06:00:32 pm
I will try to explain it.

You make a folder with the name of the app/font/etc. Inside of that, make 2 folders, one named CONTROL and one named data. For simplicity, I will assume that this folder is on /mnt/card.

Open up a text editor and write 2.0 on the first line. Save this as /mnt/card/appname/debian-binary.

In the directory labeled "data" make the path of folders starting from root that you want to include in your install. Example: If your dictionary is in /home/root you would make a folder (inside of "data") called home, and one inside of that called "root". You then put the dictionary file in that "root" directory.

Open up a text editor and write the following:

Package: (package name)
Version: (version)
Architecture: (for pdaXrom, armv5tel, I don't know about Cacko. I would assume arm)
Maintainer: (your name)
Description: (description)

Save this as /mnt/card/appname/CONTROL/control

Once all of that is done, open up a terminal.

type:

#cd /mnt/card/appname/CONTROL
#tar -czf ../control.tar.gz ./*
#cd /mnt/card/appname/data
#tar -czf ../data.tar.gz ./*
#cd /mnt/card/appname
#tar -czf name_version_arm.ipk ./debian-binary ./data/tar/gz ./control.tar.gz

You're done. That's how it works in pdaXrom, I assume it's the same in Cacko.
Title: How Do I Make An Ipk?
Post by: Meanie on November 09, 2006, 06:18:44 pm
Quote
I will try to explain it.

You make a folder with the name of the app/font/etc. Inside of that, make 2 folders, one named CONTROL and one named data. For simplicity, I will assume that this folder is on /mnt/card.

Open up a text editor and write 2.0 on the first line. Save this as /mnt/card/appname/debian-binary.

In the directory labeled "data" make the path of folders starting from root that you want to include in your install. Example: If your dictionary is in /home/root you would make a folder (inside of "data") called home, and one inside of that called "root". You then put the dictionary file in that "root" directory.

Open up a text editor and write the following:

Package: (package name)
Version: (version)
Architecture: (for pdaXrom, armv5tel, I don't know about Cacko. I would assume arm)
Maintainer: (your name)
Description: (description)

Save this as /mnt/card/appname/CONTROL/control

Once all of that is done, open up a terminal.

type:

#cd /mnt/card/appname/CONTROL
#tar -czf ../control.tar.gz ./*
#cd /mnt/card/appname/data
#tar -czf ../data.tar.gz ./*
#cd /mnt/card/appname
#tar -czf name_version_arm.ipk ./debian-binary ./data/tar/gz ./control.tar.gz

You're done. That's how it works in pdaXrom, I assume it's the same in Cacko.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145939\"][{POST_SNAPBACK}][/a][/div]

busybox on cacko/sharp doesn't have the -z option for tar so you can't do the above on the Z directly unless you install a replacement package for tar which supports that option.

just substitute
 tar -czf ../name.tar.gz ./*
with
 tar cf - ./* | gzip > ../name.tar.gz

alternatively, just install my ipktools package and you can then do

# ipknew myappp

to create a skeleton package structure and edit the control file and replace the template with appropriate values, and dump the files you want under the data directory with the corresponding directory structure. then just run

# makeipk myapp

and your ipk file is created for you.

if you ever want to update or modify an ipk file, then you can do

# unpackipk myapp

refresh/update the files and regenerate with

# makeipk myapp
Title: How Do I Make An Ipk?
Post by: ZDevil on November 09, 2006, 06:18:56 pm
Chero has written an excellent guide, which was my very first lesson on compiling and packaging: http://users.telenet.be/zaurususer/Chero/compiling/ (http://users.telenet.be/zaurususer/Chero/compiling/)  

To my mind there also seems to be a page on packaging either in the oesf wiki or the pdaxrom website. Maybe it's just my imagination?

Edited:
Hey, here you go:
https://www.oesf.org/index.php?title=IPKG_Howto (https://www.oesf.org/index.php?title=IPKG_Howto)
https://www.oesf.org/index.php?title=Pdaxro...te_An_Ipk_Howto (https://www.oesf.org/index.php?title=Pdaxrom:_Create_An_Ipk_Howto)
Title: How Do I Make An Ipk?
Post by: kurochka on November 10, 2006, 11:31:22 am
This is awesome!  Thank you, everybody, for a prompt response.  Using ipk is much easier than copying by hand.  I understand that I can put simlinks in data and they will be part of the package, right?  In that case, I guess I shouldn't use a FAT card.