- if [ ! -f "${DEVICE_MAPPER_BINCACHE}" ]
- then
- [ ! -f "${DEVICE_MAPPER_SRCTAR}" ] &&
- gen_die "Could not find device-mapper source tarball: ${DEVICE_MAPPER_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
- cd "${TEMP}"
- rm -rf "${DEVICE_MAPPER_DIR}"
- /bin/tar -zxpf "${DEVICE_MAPPER_SRCTAR}"
- [ ! -d "${DEVICE_MAPPER_DIR}" ] &&
- gen_die "device-mapper directory ${DEVICE_MAPPER_DIR} invalid"
- cd "${DEVICE_MAPPER_DIR}"
- CFLAGS="-fPIC" \
- ./configure --prefix=${TEMP}/device-mapper --enable-static_link \
- --disable-selinux >> ${LOGFILE} 2>&1 ||
- gen_die 'Configuring device-mapper failed!'
- print_info 1 'device-mapper: >> Compiling...'
- compile_generic '' utils
- compile_generic 'install' utils
- print_info 1 ' >> Copying to cache...'
- cd "${TEMP}"
- rm -rf "${TEMP}/device-mapper/man" ||
- gen_die 'Could not remove manual pages!'
- strip "${TEMP}/device-mapper/sbin/dmsetup" ||
- gen_die 'Could not strip dmsetup binary!'
- /bin/tar -jcpf "${DEVICE_MAPPER_BINCACHE}" device-mapper ||
- gen_die 'Could not tar up the device-mapper binary!'
- [ -f "${DEVICE_MAPPER_BINCACHE}" ] ||
- gen_die 'device-mapper cache not created!'
- cd "${TEMP}"
- rm -rf "${DEVICE_MAPPER_DIR}" > /dev/null
- rm -rf "${TEMP}/device-mapper" > /dev/null
- fi
-}
-
-compile_e2fsprogs() {
- if [ -f "${BLKID_BINCACHE}" ]
- then
- print_info 1 "blkid: >> Using cache"
- else
- [ ! -f "${E2FSPROGS_SRCTAR}" ] &&
- gen_die "Could not find e2fsprogs source tarball: ${E2FSPROGS_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
- cd "${TEMP}"
- rm -rf "${E2FSPROGS_DIR}"
- tar -zxpf "${E2FSPROGS_SRCTAR}"
- [ ! -d "${E2FSPROGS_DIR}" ] &&
- gen_die "e2fsprogs directory ${E2FSPROGS_DIR} invalid"
- cd "${E2FSPROGS_DIR}"
- print_info 1 'e2fsprogs: >> Configuring...'
- LDFLAGS=-static ./configure >> ${LOGFILE} 2>&1 ||
- gen_die 'Configuring e2fsprogs failed!'
- print_info 1 'e2fsprogs: >> Compiling...'
- MAKE=${UTILS_MAKE} compile_generic "" ""
- print_info 1 'blkid: >> Copying to cache...'
- [ -f "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ] ||
- gen_die 'Blkid executable does not exist!'
- strip "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
- gen_die 'Could not strip blkid binary!'
- bzip2 "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
- gen_die 'bzip2 compression of blkid failed!'
- mv "${TEMP}/${E2FSPROGS_DIR}/misc/blkid.bz2" "${BLKID_BINCACHE}" ||
- gen_die 'Could not copy the blkid binary to the package directory, does the directory exist?'
-
- cd "${TEMP}"
- rm -rf "${E2FSPROGS_DIR}" > /dev/null
- fi