summaryrefslogtreecommitdiff
path: root/autoinstall/bootstrap/pbuilder.txt
blob: 2c4d0e703a3a648ac32b82b15b40fc66cfaffc80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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