Sākumlapa › Forumi › Notepad.lv › IT ziņas › Raksti › Veidojam .deb paku (atjaunots)
Zināms, ka Debian (un arī Ubuntu) programmas tiek pieinstalētas no .deb./configure && make && make install.deb
Kā piemēru izmantošu Gnome Original Disk Mount applet.deb
Un tā – pie darba. Pārliecinamies, ka mums ir uzinstalētas nepieciešamās pakas:
apt-get install build-essential fakeroot dh-make autotools-dev
Novelkam un atpakojam sourci
wget http://kent.dl.sourceforge.net/sourceforge/gqapplets/drivemount-original-applet-2.10.0.tar.gz
tar -xzf drivemount-original-applet-2.10.0.tar.gz
cd drivemount-original-applet-2.10.0/
“Debianizējam”:
dh_make -c gpl -e [email protected] -f ../drivemount-original-applet-2.10.0.tar.gz
dh_make
kādu paku gribam taisīt? Atbildam s
[img]
dh_makedebian
Sāksim ar “birokrātiju”: copyright
This package was debianized by Velko
Sat, 20 Oct 2007 14:56:52 +0300.
It was downloaded from http://gqapplets.sourceforge.net/applet-mount.html
Upstream Author: John Ellis
Copyright: (C) 2005 John Ellis
(C) 1999-2004 The GNOME Hackers
(C) 1998 John Ellis (original code)
Nākošais changelog
drivemount-original-applet (2.10.0-1) unstable; urgency=low
* Initial release
— Velko
Manuprāt ķēpīgākais fails: control
Aizpildam DescriptionDependsBuild-Depends
Source: drivemount-original-applet
Section: unknown
Priority: extra
Maintainer: Velko
Build-Depends: debhelper (>= 5), autotools-dev, intltool, libpanel-applet2-dev
Standards-Version: 3.7.2
Package: drivemount-original-applet
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Gnome Disk Mounter (the original)
The original drive mount applet that was a part of the gnome-applets
package through GNOME 2.8, for 2.10 they decided to rewrite it and
drop usability. (sigh)
rules.debdh_make
README.Debian
Tagad varam mēģināt kompilēt paku:
fakeroot dpkg-buildpackage
Ja met kādas kļūdas, tad skatamies, kas pietrūkst, pierakstam attiecīgo paku control/Build-Depends
Kad beidzot kompilācija nostrādā, izveidojas debian/drivemount-original-applet/usr/libexec//usr/lib/gnome-applets/
Rediģējam rules–libexecdir
config.status: configure
dh_testdir
# Add here commands to configure the package.
./configure –host=$(DEB_HOST_GNU_TYPE) –build=$(DEB_BUILD_GNU_TYPE)
–prefix=/usr –mandir=$${prefix}/share/man –infodir=$${prefix}/share/info
–libexecdir=$${exec_prefix}/lib/gnome-applets
CFLAGS=”$(CFLAGS)” LDFLAGS=”-Wl,-z,defs”
Kompilējam vēlreiz – tagad applets nonāk “pareizajā” vietā – /usr/lib/gnome-applets/
Protams, dpkg-buildpackage.deb
Pievienojam paku personīgajam repozitorijam
dpkg -i drivemount-original-applet_2.10.0-1_i386.deb
Pēc pakas pieinstalēšanas spiežam ar labo taustiņu uz kāda no Gnome paneļiem, ņemam Add to Panel…
[img]
Lūk arī Disk Mounter darbībā. Tā tas izskatās uz Gnome Panel (3 eksemplāri – CDROM, ārējais HDD un Flash):
[img]
Konfigurācijas dialogs:
[img]
Happy packaging!
Preses relīzes