README.configuration 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. Debian Packaging Guide
  2. ----------------------
  3. https://www.debian.org/doc/manuals/maint-guide/first.en.html
  4. ===============================================================================
  5. Bash.rc
  6. ===============================================================================
  7. # Assume usename 'user' running this, otherwise
  8. # /home/user/.bashrc
  9. cat >>~/.bashrc <<'EOF'
  10. DEBMAIL="user@chroot.local"
  11. DEBFULLNAME="Qubes Builder"
  12. export DEBMAIL DEBFULLNAME
  13. alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
  14. complete -F _quilt_completion $_quilt_complete_opt dquilt
  15. EOF
  16. ===============================================================================
  17. Quilt RC
  18. ===============================================================================
  19. cat >>~/.quiltrc-dpkg <<'EOF'
  20. d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done
  21. if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then
  22. # if in Debian packaging tree with unset $QUILT_PATCHES
  23. QUILT_PATCHES="debian/patches"
  24. QUILT_PATCH_OPTS="--reject-format=unified"
  25. QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
  26. QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
  27. QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
  28. if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi
  29. fi
  30. EOF
  31. ===============================================================================
  32. Create a fresh Debian configuration
  33. ===============================================================================
  34. apt-get dh-make
  35. # Example
  36. $ cd ~/gentoo
  37. $ wget http://example.org/gentoo-0.9.12.tar.gz
  38. $ tar -xvzf gentoo-0.9.12.tar.gz
  39. $ cd gentoo-0.9.12
  40. $ dh_make -f ../gentoo-0.9.12.tar.gz
  41. ===============================================================================
  42. Adding Patches
  43. ===============================================================================
  44. https://www.debian.org/doc/manuals/maint-guide/modify.en.html
  45. # When anyone (including yourself) provides a patch foo.patch to the source
  46. # later, modifying a 3.0 (quilt) source package is quite simple:
  47. $ dpkg-source -x gentoo_0.9.12.dsc
  48. $ cd gentoo-0.9.12
  49. $ dquilt import ../foo.patch
  50. $ dquilt push
  51. $ dquilt refresh
  52. $ dquilt header -e
  53. ... describe patch
  54. ===============================================================================
  55. Other
  56. ===============================================================================
  57. # To list all dh_ modules...
  58. man -k dh_
  59. # To indicate what build-depends are required!
  60. dpkg-depcheck -d ./configure
  61. # Test build (unsigned)
  62. dpkg-buildpackage -us -uc