[ powrót ] [ Spis treści ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ A ] [ dalej ]


Podręcznik dla nowych opiekunów pakietów Debiana
Dodatek A - Przykłady


Mamy do zapakowania archiwum autorskie gentoo-1.0.2.tar.gz i wgrywamy wszystkie pakiety do nm_target.


A.1 Prosty przykład pakowania

       $ mkdir -p /path/to # nowy pusty katalog
       $ cd /path/to
       $ tar -xvzf /path/from/gentoo-1.0.2.tar.gz # rozpakowujemy źródła
       $ cd gentoo-1.0.2
       $ dh_make -e name@domain.dom -f /path/from/gentoo-1.0.2.tar.gz
       ... Odpowiedz na pytania
       ... Popraw drzewo źródeł
       ... Jeśli jest to pakiet skryptowy, wpisz "Architecture: all" do debian/control
       ... Nie kasuj ../gentoo_1.0.2.orig.tar.gz
       $ debuild
       ... Nie powinno być ostrzeżeń
       $ cd ..
       $ dupload -t nm_target gentoo_1.0.2-1_i386.changes

A.2 Przykład z dpatch i pbuilder

       $ mkdir -p /path/to # nowy pusty katalog
       $ cd /path/to
       $ tar -xvzf /path/from/gentoo-1.0.2.tar.gz
       $ cp -a  gentoo-1.0.2 gentoo-1.0.2-orig
       $ cd gentoo-1.0.2
       $ dh_make -e name@domain.dom -f /path/from/gentoo-1.0.2.tar.gz
       ... Odpowiedz na pytania

Tu mamy fragment oryginalnego pliku debian/rules:

       configure: configure-stamp
       configure-stamp:
             dh_testdir
             # Add here commands to configure the package.
             touch configure-stamp
       build: build-stamp
       build-stamp: configure-stamp 
             dh_testdir
             # Add here commands to compile the package.
             $(MAKE)
             #docbook-to-man debian/gentoo.sgml > gentoo.1
             touch $@
       clean:
             dh_testdir
             dh_testroot
             rm -f build-stamp configure-stamp
             # Add here commands to clean up after the build process.
             -$(MAKE) clean
             dh_clean

Za pomocą edytora zmień debian/rules w następujący sposób, tak aby używać dpatch oraz dodaj dpatch w linii Build-Depends: pliku debian/control:

       configure: configure-stamp
       configure-stamp: patch
             dh_testdir
             # Add here commands to configure the package.
             touch configure-stamp
       build: build-stamp
       build-stamp: configure-stamp 
             dh_testdir
             # Add here commands to compile the package.
             $(MAKE)
             #docbook-to-man debian/gentoo.sgml > gentoo.1
             touch $@
       clean: clean-patched unpatch
             dh_testdir
             dh_testroot
             rm -f build-stamp configure-stamp
             # Add here commands to clean up after the build process.
             -$(MAKE) clean
             dh_clean 
       patch: patch-stamp
       patch-stamp:
             dpatch apply-all
             dpatch call-all -a=pkg-info >patch-stamp
       unpatch:
             dpatch deapply-all
             rm -rf patch-stamp debian/patched

W ten sposób możesz już pakować źródła za pomocą systemu dpatch używając programu dpatch-edit-patch.

       $ dpatch-edit-patch patch 10_firstpatch
       ... Popraw źródła edytorem
       $ exit 0
       ... Spróbuj zbudować pakiety przy użyciu "debuild -us -uc"
       ... Wyczyść źródła wywołując "debuild clean"
       ... Powtarzaj dpatch-edit-patch aż do zbudowania pakietów ze źródeł
       $ sudo pbuilder update
       $ pdebuild
       $ cd /var/cache/pbuilder/result/
       $ dupload -t nm_target gentoo_1.0.2-1_i386.changes

[ powrót ] [ Spis treści ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ A ] [ dalej ]


Podręcznik dla nowych opiekunów pakietów Debiana

wersja oryginału: 1.2.11, 12-01-2007, wersja tłumaczenia: 1.2.5, 27-09-2007

Josip Rodin joy-mg@debian.org
polskie tłumaczenie: Paweł Tęcza ptecza@debianusers.pl
korekta tłumaczenia: Marcin Owsiany porridge@debian.org
wznowienie tłumaczenia: Wojciech Zaręba wojtekz@comp.waw.pl