All pastes #53697 Raw Edit

build

public shellscript v1 · immutable
#53697 ·published 2006-05-05 09:33 UTC
rendered paste body
# Copyright 1999-2006 Gentoo Foundation# 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=""DEPEND=">=sys-fs/device-mapper-1.00.08	>=virtual/linux-sources-2.6.5" # S=Source-Verzeichnis src_compile geht in das $S Verzeichnis # WORKDIR: /tmp/portage/paketname/work# durch entpacken mit tar --> er geht davon aus, dass das Verzeichnis was durch das entpacken entsteht $P ($P=paketname - versionsname)S=${WORKDIR}/${P}/Linuxsrc_compile() {	##########################	# 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	{ unset ARCH; /bin/sh build.sh; } || die}pkg_preinst() {	if ! dmsetup targets >/dev/null; then		eerror "TrueCrypt requires device mapper tools (dmsetup) 1.00.08 or later.";		eerror "Check also your kernel-config.";		eerror "Come back when 'dmsetup targets' returns no errors anymore.";		die;	fi;}src_install() {	#########################	# 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 /usr/local to /usr	sed -i -e 's#/usr/local/#/usr/#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 "$MOD_DIR"#g' install.sh	# omit "dmsetup"-check (because it was done in preinst)	sed -i -e 's#if ! dmsetup targets >&-#if [ 1 == 0 ];#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	dodoc "../License.txt"	dodoc "../Readme.txt"}pkg_postinst() {    depmod -a || eerror "depmod -a FAILED"}