summaryrefslogtreecommitdiff
path: root/autoinstall/bootstrap/pbuilder.txt
diff options
context:
space:
mode:
Diffstat (limited to 'autoinstall/bootstrap/pbuilder.txt')
-rw-r--r--autoinstall/bootstrap/pbuilder.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/autoinstall/bootstrap/pbuilder.txt b/autoinstall/bootstrap/pbuilder.txt
new file mode 100644
index 0000000..2c4d0e7
--- /dev/null
+++ b/autoinstall/bootstrap/pbuilder.txt
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+cat > /home/kolab/.pbuilderrc << EOF
+# do not specify variables when running cowbuilder --create or --update
+if [ -f debian/changelog ]; then
+ [ -z "\$ARCH" ] && ARCH=\$(dpkg --print-architecture)
+ [ -z "\$DIST" ] && DIST=\$(dpkg-parsechangelog | sed -n 's/^Distribution: //p')
+fi
+
+if [ "\${DIST}" == "squeeze" -o "\${DIST}" == "wheezy" -o "\${DIST}" == "sid" ]; then
+ MIRRORSITE=http://ftp.uk.debian.org/debian
+else
+ MIRRORSITE=http://mirror.krystal.co.uk/ubuntu/
+fi
+
+DEBOOTSTRAPOPTS[${#DEBOOTSTRAPOPTS[@]}]="--no-check-gpg"
+PDEBUILD_PBUILDER="cowbuilder --build --basepath /var/cache/pbuilder/base-\${DIST}-\${ARCH}.cow --mirror \${MIRRORSITE}"
+DEBBUILDOPTS="-us -uc -sa -d \${OPTS}"
+ARCHITECTURE=\${ARCH}
+BUILDRESULT=~/builds
+EXTRAPACKAGES="\$EXTRAPACKAGES lintian"
+AUTO_DEBSIGN=no
+HOOKDIR=\${HOME}/.pbuilder/hooks/
+PKGNAME_LOGFILE_EXTENTION="_\${ARCH}.build"
+EOF
+
+ln -sf /home/kolab/.pbuilderrc /root/.pbuilderrc