summaryrefslogtreecommitdiffstats
path: root/auto/config
blob: 89bbee0526c5ce02d9ccd61ed25e4ea38e107677 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /bin/sh
# automatically run by "lb config"

. config/amnesia
if [ -e config/amnesia.local ] ; then
   . config/amnesia.local
fi

# init variables
RUN_LB_CONFIG="lb config noauto"

# init config/ with defaults for the target distribution
$RUN_LB_CONFIG --distribution squeeze ${@}

# set Amnesia's general options
$RUN_LB_CONFIG \
   --apt-recommends false \
   --backports true \
   --binary-images iso-hybrid \
   --binary-indices false \
   --isohybrid-options "$AMNESIA_ISOHYBRID_OPTS" \
   --bootappend-live "${AMNESIA_APPEND}" \
   --bootstrap "cdebootstrap" \
   --archive-areas "main contrib non-free" \
   --iso-application="The Amnesic Incognito Live System" \
   --iso-publisher="https://tails.boum.org/" \
   --iso-volume="TAILS ${AMNESIA_FULL_VERSION}" \
   --memtest none \
   --packages-lists="standard" \
   --syslinux-menu vesamenu \
   --syslinux-splash data/splash.png \
   --syslinux-timeout 4 \
   --initramfs=live-boot \
   ${@}

# build i386 images on amd64 as well, include only 686 kernel
hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" = i386 -o "$hw_arch" = amd64 ]; then
   $RUN_LB_CONFIG \
      --architecture i386 \
      --linux-flavours 686 \
      ${@}
# build powerpc images on powerpc64 as well, include only powerpc kernel
elif [ "$hw_arch" = powerpc -o "$hw_arch" = powerpc64 ]; then
   $RUN_LB_CONFIG \
      --architecture powerpc \
      --linux-flavours powerpc \
      ${@}
fi

# version
mkdir -p config/chroot_local-includes/etc/amnesia/
echo "${AMNESIA_FULL_VERSION}" > config/chroot_local-includes/etc/amnesia/version
if git rev-list HEAD 2>&1 >/dev/null; then
   git rev-list HEAD | head -n 1 >> config/chroot_local-includes/etc/amnesia/version
fi
echo "live-build: `dpkg-query -W -f='${Version}\n' live-build`" \
   >> config/chroot_local-includes/etc/amnesia/version

# changelog
cp debian/changelog config/chroot_local-includes/usr/share/doc/amnesia/Changelog

# GnuPG key
cp wiki/src/amnesia.asc config/chroot_local-includes/usr/share/doc/amnesia/

# create readahead-list from squashfs.sort
if [ -e config/binary_rootfs/squashfs.sort ]; then
    mkdir -p config/chroot_local-includes/usr/share/amnesia
    sort -k2 -n -r config/binary_rootfs/squashfs.sort |
        cut -d' ' -f1 > config/chroot_local-includes/usr/share/amnesia/readahead-list
fi