Advertisement
Guest User

Untitled

a guest
Nov 26th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. # Codenames for Debian suites according to their alias. Update these when
  2. # needed.
  3. UNSTABLE_CODENAME="sid"
  4. TESTING_CODENAME="jessie"
  5. STABLE_CODENAME="wheezy"
  6. STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports"
  7.  
  8. # List of Debian suites.
  9. DEBIAN_SUITES=($UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME
  10. "unstable" "testing" "stable")
  11.  
  12. # List of Ubuntu suites. Update these when needed.
  13. UBUNTU_SUITES=("trusty" "saucy" "raring" "quantal" "precise" "lucid")
  14.  
  15. # Mirrors to use. Update these to your preferred mirror.
  16. DEBIAN_MIRROR="ftp.at.debian.org"
  17. UBUNTU_MIRROR="ubuntu.inode.at/ubuntu/"
  18.  
  19. # Optionally use the changelog of a package to determine the suite to use if
  20. # none set.
  21. if [ -z "${DIST}" ] && [ -r "debian/changelog" ]; then
  22. DIST=$(dpkg-parsechangelog | awk '/^Distribution: / {print $2}')
  23. DIST="${DIST%%-*}"
  24. # Use the unstable suite for certain suite values.
  25. if $(echo "experimental UNRELEASED" | grep -q $DIST); then
  26. DIST="$UNSTABLE_CODENAME"
  27. fi
  28. fi
  29.  
  30. # Optionally set a default distribution if none is used. Note that you can set
  31. # your own default (i.e. ${DIST:="unstable"}).
  32. : ${DIST:="$(lsb_release --short --codename)"}
  33.  
  34. # Optionally change Debian release states in $DIST to their names.
  35. case "$DIST" in
  36. unstable)
  37. DIST="$UNSTABLE_CODENAME"
  38. ;;
  39. testing)
  40. DIST="$TESTING_CODENAME"
  41. ;;
  42. stable)
  43. DIST="$STABLE_CODENAME"
  44. ;;
  45. esac
  46.  
  47. # Optionally set the architecture to the host architecture if none set. Note
  48. # that you can set your own default (i.e. ${ARCH:="i386"}).
  49. : ${ARCH:="$(dpkg --print-architecture)"}
  50.  
  51. NAME="$DIST"
  52. if [ -n "${ARCH}" ]; then
  53. NAME="$NAME-$ARCH"
  54. DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
  55. fi
  56. # BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"
  57. # Optionally, set BASEPATH (and not BASETGZ) if using cowbuilder
  58. BASEPATH="/var/cache/pbuilder/base-$NAME.cow/"
  59. DISTRIBUTION="$DIST"
  60. BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
  61. APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"
  62. BUILDPLACE="/var/cache/pbuilder/build/"
  63. BINDMOUNTS="/var/cache/archive"
  64.  
  65. if $(echo ${DEBIAN_SUITES[@]} | grep -q $DIST); then
  66. # Debian configuration
  67. MIRRORSITE="http://$DEBIAN_MIRROR/debian/"
  68. COMPONENTS="main contrib non-free"
  69. DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg")
  70. OTHERMIRROR="deb file:///var/cache/archive $DIST/"
  71. elif $(echo ${UBUNTU_SUITES[@]} | grep -q $DIST); then
  72. # Ubuntu configuration
  73. MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/"
  74. COMPONENTS="main restricted universe multiverse"
  75. DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
  76. OTHERMIRROR="deb file:///var/cache/archive $DIST/"
  77. else
  78. echo "Unknown distribution: $DIST"
  79. exit 1
  80. fi
  81.  
  82. PDEBUILD_PBUILDER="cowbuilder"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement