-
Notifications
You must be signed in to change notification settings - Fork 0
/
pbuilderrc.sh
66 lines (59 loc) · 2.1 KB
/
pbuilderrc.sh
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
set -e
if [ "$OS" == "debian" ]; then
#MIRRORSITE="http://ftp.no.debian.org/debian/"
MIRRORSITE="http://kambing.ui.ac.id/debian/"
COMPONENTS="main contrib non-free"
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}"
"--keyring=/usr/share/keyrings/debian-archive-keyring.gpg")
: ${DIST:="jessie"}
: ${ARCH:="amd64"}
if [ "$DIST" == "jessie" ]; then
#EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"
OTHERMIRROR="$OTHERMIRROR | deb $MIRRORSITE jessie-backports $COMPONENTS"
fi
elif [ "$OS" == "raspbian" ]; then
MIRRORSITE="http://ftp.acc.umu.se/mirror/raspbian/raspbian/"
COMPONENTS="main contrib non-free"
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}"
"--keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg")
: ${DIST:="jessie"}
: ${ARCH:="armhf"}
elif [ "$OS" == "blankon" ]; then
MIRRORSITE="http://arsip.blankonlinux.or.id/blankon/"
COMPONENTS="main restricted extras extras-restricted"
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}"
"--keyring=/usr/share/keyrings/blankon-archive-keyring.gpg")
: ${DIST:="tambora"}
: ${ARCH:="amd64"}
elif [ "$OS" == "ubuntu" ]; then
MIRRORSITE="http://no.archive.ubuntu.com/ubuntu/"
COMPONENTS="main restricted universe multiverse"
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}"
"--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
else
echo "Unknown OS: $OS"
exit 1
fi
if [ "$DIST" == "" ]; then
echo "DIST is not set"
exit 1
fi
if [ "$ARCH" == "" ]; then
echo "ARCH is not set"
exit 1
fi
NAME="$OS-$DIST-$ARCH"
if [ "$ARCH" == "armel" ] && [ "$(dpkg --print-architecture)" != "armel" ]; then
DEBOOTSTRAP="qemu-debootstrap"
fi
if [ "$ARCH" == "armhf" ] && [ "$(dpkg --print-architecture)" != "armhf" ]; then
DEBOOTSTRAP="qemu-debootstrap"
fi
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--arch=$ARCH")
BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"
DISTRIBUTION="$DIST"
BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"
BUILDPLACE="/var/cache/pbuilder/build"
HOOKDIR="/var/cache/pbuilder/hook.d/"