[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ A ] [ next ]
Here we package the upstream tarball gentoo-1.0.2.tar.gz and uploading all the packages to the nm_target.
$ mkdir -p /path/to # new empty directory
$ cd /path/to
$ tar -xvzf /path/from/gentoo-1.0.2.tar.gz # get source
$ cd gentoo-1.0.2
$ dh_make -e [email protected] -f /path/from/gentoo-1.0.2.tar.gz
... Answer prompts.
... Fix source tree
... If it is a script package, set debian/control to "Architecture: all"
... Do not erase ../gentoo_1.0.2.orig.tar.gz
$ debuild
... Make sure no warning happens.
$ cd ..
$ dupload -t nm_target gentoo_1.0.2-1_i386.changes
dpatch and the pbuilder
$ mkdir -p /path/to # new empty directory
$ 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 [email protected] -f /path/from/gentoo-1.0.2.tar.gz
... Answer prompts.
Here part of debian/rules originally looks like:
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
You change this part of debian/rules to the following by the
editor to use dpatch and add dpatch to the
Build-Depends: line in the debian/control file:
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
clean-patched:
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
Now you are ready to repackage the source tree with dpatch system
with the help of dpatch-edit-patch.
$ dpatch-edit-patch patch 10_firstpatch
... Fix source tree by editor
$ exit 0
... Try building packages with "debuild -us -uc"
... Clean source with "debuild clean"
... Repeat dpatch-edit-patch until making source buildable.
$ sudo pbuilder update
$ pdebuild
$ cd /var/cache/pbuilder/result/
$ dupload -t nm_target gentoo_1.0.2-1_i386.changes
[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ A ] [ next ]
Debian New Maintainers' Guide
[email protected]