config 2.16 KB
Newer Older
amnesia's avatar
amnesia committed
1
#! /bin/sh
2
# automatically run by "lb config"
amnesia's avatar
amnesia committed
3

4 5 6
. config/amnesia
if [ -e config/amnesia.local ] ; then
   . config/amnesia.local
amnesia's avatar
amnesia committed
7 8
fi

9
# init variables
10
RUN_LB_CONFIG="lb config noauto"
amnesia's avatar
amnesia committed
11

12
# init config/ with defaults for the target distribution
amnesia's avatar
amnesia committed
13
$RUN_LB_CONFIG --distribution squeeze ${@}
amnesia's avatar
amnesia committed
14 15

# set Amnesia's general options
16
$RUN_LB_CONFIG \
17
   --apt-recommends false \
T(A)ILS developers's avatar
T(A)ILS developers committed
18
   --backports false \
19 20
   --binary-images iso-hybrid \
   --isohybrid-options "$AMNESIA_ISOHYBRID_OPTS" \
amnesia's avatar
amnesia committed
21
   --bootappend-live "${AMNESIA_APPEND}" \
22
   --bootstrap "cdebootstrap" \
23
   --archive-areas "main contrib non-free" \
24
   --iso-application="The Amnesic Incognito Live System" \
amnesia's avatar
amnesia committed
25
   --iso-publisher="https://amnesia.boum.org/" \
amnesia's avatar
amnesia committed
26
   --iso-volume="TAILS ${AMNESIA_FULL_VERSION}" \
amnesia's avatar
amnesia committed
27
   --memtest none \
28
   --packages-lists="standard" \
29
   --syslinux-menu vesamenu \
amnesia's avatar
amnesia committed
30 31 32
   --syslinux-timeout 4 \
   ${@}

33
# build i386 images on amd64 as well, include only 686 kernel
amnesia's avatar
amnesia committed
34 35
hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" = i386 -o "$hw_arch" = amd64 ]; then
36
   $RUN_LB_CONFIG \
amnesia's avatar
amnesia committed
37 38 39
      --architecture i386 \
      --linux-flavours 686 \
      ${@}
40 41
# build powerpc images on powerpc64 as well, include only powerpc kernel
elif [ "$hw_arch" = powerpc -o "$hw_arch" = powerpc64 ]; then
42
   $RUN_LB_CONFIG \
43 44 45
      --architecture powerpc \
      --linux-flavours powerpc \
      ${@}
amnesia's avatar
amnesia committed
46 47 48
fi

# version
49
mkdir -p config/chroot_local-includes/etc/amnesia/
50
echo "${AMNESIA_FULL_VERSION}" > config/chroot_local-includes/etc/amnesia/version
amnesia's avatar
amnesia committed
51
if git rev-list HEAD 2>&1 >/dev/null; then
52 53
   git rev-list HEAD | head -n 1 >> config/chroot_local-includes/etc/amnesia/version
fi
54 55
echo "live-build: `dpkg-query -W -f='${Version}\n' live-build`" \
   >> config/chroot_local-includes/etc/amnesia/version
56 57

# changelog
58
cp debian/changelog config/chroot_local-includes/usr/share/doc/amnesia/Changelog
59 60 61

# GnuPG key
cp wiki/src/amnesia.asc config/chroot_local-includes/usr/share/doc/amnesia/
62 63 64 65 66 67 68

# 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