All pastes #53539 Raw Edit

Anonymous

public text v1 · immutable
#53539 ·published 2006-05-04 14:50 UTC
rendered paste body
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

# Short one-line description of this package.
DESCRIPTION="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, not used by Portage directly but handy for developer reference
HOMEPAGE="http://truecrypt.org/"

# Point to any required sources; these will be automatically downloaded by
# Portage.
SRC_URI="http://www.truecrypt.org/downloads/${P}-source-code.tar.gz"

LICENSE="truecrypt"

# DO NOT USE SLOT=""! This tells Portage to disable SLOTs for this package.
SLOT="0"

KEYWORDS="~x86"

#IUSE="X gnome"
IUSE=""

#RESTRICT="nostrip"

# Build-time dependencies, such as
#    ssl? ( >=dev-libs/openssl-0.9.6b )
#    >=dev-lang/perl-5.6.1-r1
# It is advisable to use the >= syntax show above, to reflect what you
# had installed on your system when you tested the package.  Then
# other users hopefully won't be caught without the right version of
# a dependency.
DEPEND=">=sys-fs/device-mapper-1.00.08
	>=virtual/linux-sources-2.6.5" 

S=${WORKDIR}/${P}

src_compile() {
	cd Linux
	sed -i -e 's#if \[ -f /proc/config.gz -o -f /boot/config-$(uname -r) \]#if [ 0 == 1 ];#' build.sh
	sed -i 's#\(if \[ ! -d "$KERNEL_SRC".*\)"#\1 ; then ( echo "No Kernel config !" ; exit 1 ) fi ; if [ 0 == 1 ]#' build.sh
	build.sh || die
}

src_install() {
	error_occured=0;
	if [ ! -c /dev/mapper/control -a ! -L /dev/mapper/control ]; then
		eerror "ERROR:\n\t/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 "ERROR:\n\tNo loopback device /dev/loop found - please create it first."
		error_occured=1;
	fi;

	DESTDIR=${D}
	install.sh || die

	# The portage shortcut to the above command is simply:
	#
	#einstall || die
}