2008年6月12日 星期四

How to do debianization on source codes and binary

1. Source code written by yourself

cd /home/demo

mkdir hello-1.0.1 #The pattern of dirctory's name must be "-"

cd hello-1.0.1

vim main.c

vim Makefile

dpkg-buildpackage -rfakeroot -us -uc -d


cd ..

#hello_1.0.1-1.diff.gz
#hello_1.0.1-1.dsc
#hello_1.0.1-1_i386.changes
#hello_1.0.1-1_i386.deb
#hello_1.0.1.orig.tar.gz

2. Source code from other source (not maintained by Debian or Ubuntu community)

cd /home/demo

wget http://www.lesswatts.org/projects/powertop/download/powertop-1.9.tar.gz

tar zxvf powertop-1.9.tar.gz

cd powertop-1.9

dh_make -e jeff_laio@asus.com.tw --createorig

cd debian

rm cron.d.ex dirs emacsen-* powertop* init.d.* manpage.* menu.ex watch.ex README.Debian

vim control # Set the value of field "Section" as "misc", and add "libncursesw5-dev (>= 5.5-5)" to "Build-Depends"

cd ..

dpkg-buildpackage -rfakeroot -us -uc -d

cd /home/demo


ls -al

#powertop_1.9-1.dsc
#powertop_1.9.orig.tar.gz
#powertop_1.9-1_i386.changes
#powertop_1.9-1.diff.gz
#powertop_1.9-1_i386.deb

3. Build source code

#Go to "http://www.debian.org/distrib/packages" for searching packages that you want.

mkdir /home/demo/emacs

cd /home/demo/emacs

wget http://ftp.de.debian.org/debian/pool/main/e/emacs21/emacs21_21.4a+1-3etch1.dsc
wget http://ftp.de.debian.org/debian/pool/main/e/emacs21/emacs21_21.4a+1.orig.tar.gz
wget http://ftp.de.debian.org/debian/pool/main/e/emacs21/emacs21_21.4a+1-3etch1.diff.gz


dpkg-source -x emacs21_21.4a+1-3etch1.dsc
cd emacs21-21.4a+1
apt-get install mailx libncurses5-dev texinfo liblockfile-dev libungif4-dev libtiff4-dev xaw3dg-dev libpng3-dev libjpeg62-dev autotools-dev dpkg-dev quilt debhelper libxaw7-dev sharutils #Install building dependency known from "debian/control".

dpkg-buildpackage -rfakeroot -us -uc -d


4. Package the binary Debian package:

mkdir /home/demo/hello

cd /home/demo

dpkg -x hello_1.0.1-1_i386.deb hello
dpkg -e hello_1.0.1-1_i386.deb hello/DEBIAN


5 .How to creat the "eap" package

1. Create eap file:
1) Download the kopte example from ftp://asusimg:xdos4all@devftp.xandros.com/kopete.tar.gz
2) tar zxvf kopete.tart.gz
3) cd kopete
4) tar cvf ../kopete.eap *.*

The EAP file consists of:

1)*.png : is EeePC desktop icon
2)*.desktop : is application desktop file, and the field "Icon"
value of *.desktop must be the same as the name of EeePC desktop icon.
3)debian file of the application
4)related debian files of the applications
5) The value of the field "Exec" can not have the symbol " " "
2.
If installing the application from debian file, dependency will be resovled by the update server.

3.
If installing the application from EAP file, dependency will be resovled from
the local directory.

4.
Realted files of the new insatller are:
1) /etc/AsusLauncher/AsusLauncher.conf
2) /opt/xandros/share/launcherxml : consists of XML sinppets of insatlled
applications created by the new installer.
3) /opt/xandros/share/AsusLauncher/simpleui.rc : is bakup file of
Asus Launcher cnfiguration file.
4) /var/lib/AsusLauncher/simpleui.rc : created by new insataller by merging the
XML snippets of installed applications with /opt/xandros/share/AsusLauncher/
simpleui.rc
5) /opt/xandros/sbin/update-launcher : update the of staus of EeePC Desktop

沒有留言: