blob: ce23a70e0b674dda859e42f83fb465c9b45667ef (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# See /usr/share/pbuilder/pbuilderrc for defaults
# Basic configuration
ARCH=${ARCH:=amd64}
DIST=${DIST:=sid}
COMPONENTS=${COMPONENTS:=main contrib non-free}
HOOKDIR=${HOOKDIR:=$HOME/.config/pbuilder/hooks/}
# Source custom configuration
if [ -e "$HOME/.custom/pbuilderrc" ]; then
source $HOME/.custom/pbuilderrc
fi
# Map distribution option to our env variable
DISTRIBUTION="$DIST"
# Bindmounts
if [ ! -z "$BINDMOUNTS" ]; then
mkdir -p $BINDMOUNTS
fi
# Backports
# https://wiki.ubuntu.com/PbuilderHowto#Using_backport_repositories_in_pbuilder
# https://wiki.debian.org/BuildingFormalBackports#Building_multi-dependencies_packages
if [ "$DIST" != "sid" ]; then
OTHERMIRROR="deb http://http.debian.net/debian/ $DIST-backports $COMPONENTS"
fi
# Local package repository, see, see, see, see
# https://wiki.debian.org/AutomateBackports
# https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build
if [ ! -z "$LOCALDEBS" ]; then
# Ensure it exists
mkdir -p $LOCALDEBS
if [ ! -z "$OTHERMIRROR" ]; then
OTHERMIRROR="$OTHERMIRROR | deb file://${LOCALDEBS} ./"
else
OTHERMIRROR="deb file://${LOCALDEBS} ./"
fi
fi
# Ensure a sane TMP for building packages
TMP="/tmp"
# Multiple pbuilders
# https://wiki.ubuntu.com/PbuilderHowto#Multiple_pbuilders
# https://wiki.debian.org/cowbuilder#Building_your_package_for_many_distributions_at_once
BASEPATH=${BASEPATH:=/var/cache/pbuilder/$DIST-$ARCH/base.cow/}
BUILDRESULT=${BUILDRESULT:=/var/cache/pbuilder/$DIST-$ARCH/result/}
APTCACHE=${APTCACHE:=/var/cache/pbuilder/$DIST-$ARCH/aptcache/}
BUILDPLACE=${BUILDPLACE:=/var/cache/pbuilder/build/}
|