Installing packages to N800 from source

For example, get a package called "gst-plugins-good0.10":
Terminal 代码
  1. [sbox-SDK_ARMEL: ~] fakeroot apt-get update   
  2. [sbox-SDK_ARMEL: ~] fakeroot apt-get build-dep gst-plugins-good0.10    
  3. [sbox-SDK_ARMEL: ~] fakeroot apt-get source gst-plugins-good0.10   
  4. [sbox-SDK_ARMEL: ~] cd gst-plugins-good0.10-0.10.4-osso2  

Edit debian/control file for installation:

Terminal 代码
  1. [sbox-SDK_ARMEL: ~/gst-plugins-good0.10-0.10.4-osso2] vim debian/control  

The default file is prepared for Linux desktop, not N800.  

So change "Sections: utils" into "Sections: user/utils" in each package of control file.

It is because N800 puts all user datas under "user/" directory, while as other system folders are not visible.

All other sections written in control should alse be changed.

Known sections: utils, libs, devel...

Next, to build ded package which would be installable on N800:

Terminal 代码
  1. [sbox-SDK_ARMEL: ~/gst-plugins-good0.10-0.10.4-osso2] dpkg-buildpackage -rfakeroot -b  

It will take some time.

After that, *.deb (could be 2 files or more) will appear in the home folder of scratchbox. (that is /scratchbox/user/cloud/home/cloud/)

Copy your own *.deb into N800.

If you see "Unable to install. Imcompatible package" while installing, mostly, your control file is not working correctly.

Check it out and do the packaging again.


We don't need to run:

Terminal 代码
  1. [sbox-SDK_ARMEL: ~/gst-plugins-good0.10-0.10.4-osso2] ./configure   
  2. [sbox-SDK_ARMEL: ~/gst-plugins-good0.10-0.10.4-osso2] make  

before dpkg-buildpackage, since it automatically runs both of them before packaging by default, which is controlled in /debian/rules.

However, if the sources have been modified, to save some time probably, run make to find errors before dpkg-buildpackage.


Another way of packaging:

The deb packaging process (dpkg-buildpackage) is totally controlled by the debian/ directory. But, some sources not from apt-get (got from www.debian.org) maybe doesn't contain the directory. So dh_make will be needed to create a widely usable template debian/, which includes default changelog, control, rules, etc. Dpkg-buildpackage can be runned after modified debian/control (change sections) and debian/rules (remove installdocs). But none of packages created this way have been proved effective, though normally installable.

Steps:

Terminal 代码
  1. $ sudo apt-get install dh-make dpkg-dev g++ patch make libc6-dev fakeroot libgtk2.0-dev   
  2. [sbox-SDK_ARMEL: ~/test0.1] dh_make -e [email protected] -f ../SourceFileName.tar.gz   
  3. [sbox-SDK_ARMEL: ~/test0.1] vim debian/control   
  4. [sbox-SDK_ARMEL: ~/test0.1] vim debian/rules   
  5. [sbox-SDK_ARMEL: ~/test0.1] dpkg-buildpackage -rfakeroot -b  

Note:

dh-make is a tool package including dh_make, dh_installdocs, etc. Mostly dh-make is used in apt-get install. Pay attention to the difference between dh-make and dh_make

你可能感兴趣的:(linux,Debian,F#,vim)