config 2.21 KB
Newer Older
amnesia's avatar
amnesia committed
1
#! /bin/sh
2
# automatically run by "lh 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_LH_CONFIG="lh config noauto"
amnesia's avatar
amnesia committed
11

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

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

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

amnesia's avatar
amnesia committed
47 48
# packages lists
ADD_PACKAGES_LISTS="amnesia-${AMNESIA_BASE}"
49 50 51 52
for basename in ${ADD_PACKAGES_LISTS} ; do
   cp "config/chroot_local-packageslists/${basename}" \
      "config/chroot_local-packageslists/${basename}.list"
done
amnesia's avatar
amnesia committed
53 54

# version
55
mkdir -p config/chroot_local-includes/etc/amnesia/
56
echo "${AMNESIA_FULL_VERSION}" > config/chroot_local-includes/etc/amnesia/version
amnesia's avatar
amnesia committed
57
if git rev-list HEAD 2>&1 >/dev/null; then
58 59
   git rev-list HEAD | head -n 1 >> config/chroot_local-includes/etc/amnesia/version
fi
60 61

# changelog
62
cp debian/changelog config/chroot_local-includes/usr/share/doc/amnesia/Changelog
63 64 65

# GnuPG key
cp wiki/src/amnesia.asc config/chroot_local-includes/usr/share/doc/amnesia/
66 67 68 69 70 71 72

# 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