View Single Post
Old 05-03-2007, 10:46 AM   #49
mtas
Enthusiast
mtas doesn't littermtas doesn't litter
 
Posts: 42
Karma: 145
Join Date: Oct 2006
Device: iLiad
Quote:
Originally Posted by Antartica
One last thing: for all who want to know more about ipkg, here is it's web page.

http://handhelds.org/moin/moin.cgi/Ipkg

EDIT: I was not aware that it can install by URL (!), as in "ipkg install http://projects.mobileread.com/iliad/users/johndoe/myipk.ipk". That's a VERY good thing.
For what's it worth here's the method that I use when building packages for the iLiad, it's a little different from the one that seems to be proposed but. . .

First, the file system structure is just about the same with the only difference being the addition of an extra directory named _installed_programs under programs. In this directory there is a file with the same name as the package installed. The reason for this file is to enable some control over what packages are installed in the mounted file system. I'm working on an application that will make it possible to interactively select what package to uninstall based on the content of that directory.

Secondly, no preinstall script is used to create the symlinks from /usr/local to the local file system. The reason for this is that ipkg seems to change directory to / when running the preinstall script. This of course makes it well night impossible to determine what file system that should be the target for the symlinks. Instead I embed the ipk file in a shell script that first creates the necessary symlinks and file structure and after that extracts the ipk file and installs it.

In order to make life a bit simpler for me I'm using a script to create the package.sh script described above (scripts building scripts, I know ). This scripts is a wrapper around ipkg-build and firstly build the ipk file and then appends the ipk file to a generic shell script that when run on the iLiad takes care of setting up the environment and installing the package.

The generic shell script has references to two files under /usr/bin, warning_usr-local_symlink_exists.sh and error_usr-local_directory_exists.sh. Those references can be safely ignored for now, they are placeholders for gtkdialog scripts but I'm still playing around with that.

I'm attaching a tar tar file that contains three directories , bin, mrxvt and template. In bin there's mkpkg that creates the package.sh file and install_skeleton.sh which is the script part that goes into the package.sh file. the mrxvt directory is a pre-configured package directory that can be built directly by issuing the command bin/mkpkg mrxvt. The las directory template is a "naked" package directory that contains the file structure needed for creating a package except for the parts relating to the actual application to be packaged.

So, if you want to play around with this unpack the tar ball, cd into ipkg_utils and run the command bin/mkpkg mrxvt. The result will be a file mrxvt_1.0.0.sh that can be installed on the iLiad.
EDIT: Updated the file install_skeleton.sh to reflect the usage of programs instead of additional_progs.
Attached Files
File Type: gz ipkg_utils_v2.tar.gz (103.4 KB, 643 views)

Last edited by mtas; 05-05-2007 at 04:57 AM. Reason: Script change
mtas is offline   Reply With Quote