g`"# Distributed under the terms of the GNU General Public License v2# $Header: $inherit eutilsDESCRIPTION="Truecrypt is a windows/linux based open & free software encryption tool. Supporting MANY encryption algorithms and hash-cyphers. Use it! But on your own risk :-)"HOMEPAGE="http://truecrypt.org/"SRC_URI="http://www.truecrypt.org/downloads/${P}-source-code.tar.gz"LICENSE="truecrypt"SLOT="0"KEYWORDS="~x86"IUSE=""#RESTRICT="nostrip"DEPEND=">=sys-fs/device-mapper-1.00.08 >=virtual/linux-sources-2.6.5" S=${WORKDIR}/${P}src_compile() { pushd Linux ########################## # change build.sh: ########################## # stop if NO /usr/src/linux/.config was found sed -i -e 's#if \[ -f /proc/config.gz -o -f /boot/config-$(uname -r) \]#if [ 0 == 1 ];#' build.sh # stop if the kernel-source path does not exist sed -i -e 's#\(if \[ ! -d "$KERNEL_SRC".*\)#\1; then ( eerror "No kernel source under \"$KERNEL_SRC\"found !" ; die ) fi ; if [ 0 == 1 ]#' build.sh # do not do the root-right-check sed -i -e 's#^.*Administrator (root) privileges required for kernel source configuration..*##' build.sh sed -i -e 's#cd Kernel && make#echo "KERNEL_SRC=$KERNEL_SRC"; cd Kernel \&\& make#' build.sh { unset ARCH /bin/sh build.sh } || die popd}src_install() { DESTDIR=${D} pushd Linux ######################### # error checking so that the install.sh does NOT stop and ask: ######################### error_occured=0; if [ ! -c /dev/mapper/control -a ! -L /dev/mapper/control ]; then eerror "/dev/mapper/control not found - please create it first." error_occured=1; fi; if [ ! -b /dev/loop0 -a ! -b /dev/loop/0 -a ! -b /dev/loop1 ]; then eerror "No loopback device /dev/loop found - please create it first." error_occured=1; fi; if [ $error_occured == 1 ]; then die fi; ########################## # change install.sh: ########################## # do NOT stop with "read" sed -i -e 's#read A#A="WE DO NOT WANT TO INTERRUPT HERE"#g' install.sh # do NOT reset *_DIR variables sed -i -e 's#\[ "$A" \] && [A-Z_]\+=$A##g' install.sh # change paths sed -i -e 's#^\(..._DIR=["]\?\)\(.*\)#\1${D}\2#g' install.sh # change mkdir to mkdir -p sed -i -e 's#mkdir "$MOD_DIR"#mkdir -p "$DESTDIR/$MOD_DIR"#g' install.sh # change /usr/local to /usr sed -i -e 's#/usr/local/#/usr/#g' install.sh # change the "dmsetup"-check (dmsetup version, FAILS also if kernel-setup is not correct): sed -i -e 's#dmsetup targets#dmsetup version#g' install.sh # delay depmod -a for postinst sed -i -e 's# && depmod -a$##g' install.sh # so that install.sh finds them (for test and cp) dodir "/usr/bin" dodir "/usr/man/man1" ( /bin/sh install.sh ) || die popd}pkg_postinst() { #[ "${ROOT}" == "/" ] && depmod -a depmod -a || eerror "depmod -a FAILED"}