5 # Including common functions
6 .
"${LB_BASE:-/usr/share/live/build}"/scripts
/build.sh
8 # Setting static variables
9 DESCRIPTION
="$(Echo 'including syslinux in the ISO filesystem')"
13 # Reading configuration files
14 Read_conffiles config
/all config
/bootstrap config
/common config
/binary
18 [ "${LB_BOOTLOADER}" = "syslinux" ] ||
exit 0
19 [ "${LB_ARCHITECTURE}" = "i386" ] ||
exit 0
21 # Seems like we'll have work to do
22 Echo_message
'including syslinux in the ISO filesystem'
25 LINUX_BINARY_UTILS_DIR
='binary/utils/linux'
26 WIN32_BINARY_UTILS_DIR
='binary/utils/win32'
27 BINARY_MBR_DIR
='binary/utils/mbr'
28 CHROOT_SYSLINUX_BIN
='chroot/usr/bin/syslinux'
29 CHROOT_SYSLINUX_MBR
='chroot/usr/lib/SYSLINUX/gptmbr.bin'
30 CHROOT_TEMP_APT_SOURCES
='chroot/etc/apt/sources.list.d/tmp-deb-src.list'
34 syslinux_deb_version_in_chroot
() {
35 chroot chroot dpkg-query
-W -f='${Version}\n' syslinux
39 mkdir
-p "$LINUX_BINARY_UTILS_DIR" "$WIN32_BINARY_UTILS_DIR" "$BINARY_MBR_DIR"
40 cp "$CHROOT_SYSLINUX_BIN" "$LINUX_BINARY_UTILS_DIR/"
41 cp "$CHROOT_SYSLINUX_MBR" "$BINARY_MBR_DIR/mbr.bin"
43 cat chroot
/etc
/apt
/sources.list chroot
/etc
/apt
/sources.list.d
/*.list \
44 |
sed --regexp-extended -e 's,^deb(\s+),deb-src\1,' \
45 > "$CHROOT_TEMP_APT_SOURCES"
46 mv chroot
/etc
/apt
/apt.conf.d
/{,.
}0000runtime-proxy
47 Chroot chroot apt-get
--yes update
48 Chroot chroot apt-get
--yes install dpkg-dev
49 Chroot chroot apt-get
source syslinux
="$(syslinux_deb_version_in_chroot)"
50 cp chroot
/syslinux-
*/bios
/win32
/syslinux.exe
"$WIN32_BINARY_UTILS_DIR/"
51 rm -r chroot
/syslinux
*
52 rm "$CHROOT_TEMP_APT_SOURCES"
53 mv chroot
/etc
/apt
/apt.conf.d
/{.
,}0000runtime-proxy
54 Chroot chroot apt-get
--yes update
55 Chroot chroot apt-get
--yes purge dpkg-dev
make # dpkg-dev depends on make