-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathdebbuild
More file actions
executable file
·71 lines (59 loc) · 2.29 KB
/
debbuild
File metadata and controls
executable file
·71 lines (59 loc) · 2.29 KB
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
67
68
69
70
71
#! /usr/bin/enroot batch
#ENROOT_REMAP_ROOT=y
#ENROOT_ROOTFS_WRITABLE=y
#ENROOT_ROOTFS=${ENROOT_ROOTFS:-ubuntu.sqsh}
mounts() {
echo "$(dirname $0)/.. /usr/local/src/enroot"
}
environ() {
echo "DO_RELEASE=${DO_RELEASE-}"
echo "CROSS_COMPILE=${CROSS_COMPILE-}"
echo "SHELL=/bin/bash"
}
rc() {
release=$(. /etc/os-release 2> /dev/null; echo "${VERSION_CODENAME-}")
cat <<- EOF > /etc/apt/sources.list
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${release} main restricted universe multiverse
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${release}-updates main restricted universe multiverse
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${release}-backports main restricted universe multiverse
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ ${release}-security main restricted universe multiverse
deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ ${release} main restricted universe multiverse
deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ ${release}-updates main restricted universe multiverse
EOF
apt-get -y update && apt-get -y install --no-install-recommends \
autotools-dev \
build-essential \
devscripts \
dh-make \
dh-apparmor \
fakeroot \
lintian \
lsb-release \
rename \
libmd-dev
if [[ "${CROSS_COMPILE}" =~ "aarch64-linux-gnu" ]]; then
dpkg --add-architecture arm64
apt-get -y install --no-install-recommends \
gcc-8-aarch64-linux-gnu \
linux-libc-dev-arm64-cross \
libc6-dev-arm64-cross \
libmd-dev:arm64
export ARCH=aarch64
export CC=aarch64-linux-gnu-gcc-8
elif [[ "${CROSS_COMPILE}" =~ "powerpc64le-linux-gnu" ]]; then
dpkg --add-architecture ppc64el
apt-get -y install --no-install-recommends \
gcc-8-powerpc64le-linux-gnu \
linux-libc-dev-ppc64el-cross \
libc6-dev-ppc64el-cross \
libmd-dev:ppc64el
export ARCH=powerpc64le
export CC=powerpc64le-linux-gnu-gcc-8
fi
cd /usr/local/src/enroot
if [ "$1" = "--hardened" ]; then
make deb PACKAGE=enroot-hardened
else
CPPFLAGS="-DALLOW_SPECULATION -DINHERIT_FDS" make deb
fi
}