%uL should be %Lu in patch
authorDaniel Black <dragonheart@gentoo.org>
Tue, 6 Jun 2006 12:05:42 +0000 (12:05 +0000)
committerDaniel Black <dragonheart@gentoo.org>
Tue, 6 Jun 2006 12:05:42 +0000 (12:05 +0000)
Package-Manager: portage-2.1_rc4-r2

app-crypt/truecrypt/ChangeLog
app-crypt/truecrypt/files/digest-truecrypt-4.2-r1 [new file with mode: 0644]
app-crypt/truecrypt/files/truecrypt-4.2-nosectorformat.patch
app-crypt/truecrypt/truecrypt-4.2-r1.ebuild [new file with mode: 0644]

index e910db674bd16d0712ff09dc8f55778f4e5c99ba..e3376409f03982152f1b26284a42cd1d15e86945 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for app-crypt/truecrypt
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/ChangeLog,v 1.2 2006/06/06 11:46:08 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/ChangeLog,v 1.3 2006/06/06 12:05:42 dragonheart Exp $
+
+*truecrypt-4.2-r1 (06 Jun 2006)
+
+  06 Jun 2006; Daniel Black <dragonheart@gentoo.org>
+  files/truecrypt-4.2-nosectorformat.patch, +truecrypt-4.2-r1.ebuild,
+  -truecrypt-4.2.ebuild:
+  %uL should be %Lu in patch
 
   06 Jun 2006; Daniel Black <dragonheart@gentoo.org>
   +files/truecrypt-4.2-nosectorformat.patch, truecrypt-4.2.ebuild:
diff --git a/app-crypt/truecrypt/files/digest-truecrypt-4.2-r1 b/app-crypt/truecrypt/files/digest-truecrypt-4.2-r1
new file mode 100644 (file)
index 0000000..9951f54
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 8ea4464f3f89fe8c367dc19982a8f611 truecrypt-4.2-source-code.tar.gz 1076093
+RMD160 74ba185bad9952ea9b3b0e358e9fee6f2080e6b9 truecrypt-4.2-source-code.tar.gz 1076093
+SHA256 54f54cd68c99efe3fd2c0899174b38d4cfe1ad576112672aabd2ac64e336cd1f truecrypt-4.2-source-code.tar.gz 1076093
index 669758c1f05f3d22a5db17a8901fe64fd8dc83a2..4c5bc7c82c21aeb3211fe0311daf05410322edcd 100644 (file)
@@ -5,7 +5,7 @@
        }
  
 -      if (sscanf (argv[ARG_SEC], SECTOR_FORMAT, &tc->start) != 1)
-+      if (sscanf (argv[ARG_SEC], "%uL", &tc->start) != 1)
++      if (sscanf (argv[ARG_SEC], "%Lu", &tc->start) != 1)
        {
                ti->error = "truecrypt: Invalid device sector";
                goto err;
@@ -14,7 +14,7 @@
  
        // Read-only start sector
 -      if (sscanf (argv[ARG_RO_START], SECTOR_FORMAT, &tc->read_only_start) != 1)
-+      if (sscanf (argv[ARG_RO_START], "%uL", &tc->read_only_start) != 1)
++      if (sscanf (argv[ARG_RO_START], "%Lu", &tc->read_only_start) != 1)
        {
                ti->error = "truecrypt: Invalid read-only start sector";
                goto err;
@@ -22,7 +22,7 @@
  
        // Read-only end sector
 -      if (sscanf (argv[ARG_RO_END], SECTOR_FORMAT, &tc->read_only_end) != 1)
-+      if (sscanf (argv[ARG_RO_END], "%uL", &tc->read_only_end) != 1)
++      if (sscanf (argv[ARG_RO_END], "%Lu", &tc->read_only_end) != 1)
        {
                ti->error = "truecrypt: Invalid read-only end sector";
                goto err;
diff --git a/app-crypt/truecrypt/truecrypt-4.2-r1.ebuild b/app-crypt/truecrypt/truecrypt-4.2-r1.ebuild
new file mode 100644 (file)
index 0000000..f3b1605
--- /dev/null
@@ -0,0 +1,104 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/truecrypt-4.2-r1.ebuild,v 1.1 2006/06/06 12:05:42 dragonheart Exp $
+
+inherit linux-mod toolchain-funcs
+
+DESCRIPTION="Free open-source disk encryption software for Windows XP/2000/2003 and Linux"
+HOMEPAGE="http://www.truecrypt.org/"
+SRC_URI="http://www.truecrypt.org/downloads/truecrypt-${PV}-source-code.tar.gz"
+
+LICENSE="truecrypt-2.0"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="virtual/linux-sources
+       sys-fs/device-mapper"
+
+RDEPEND="sys-fs/device-mapper"
+
+BUILD_PARAMS="KSRC=${KV_DIR} NO_WARNINGS=1"
+BUILD_TARGETS="truecrypt"
+MODULE_NAMES="truecrypt(block:${S}/Linux/Kernel)"
+
+pkg_setup() {
+       linux-info_pkg_setup
+       dmcrypt_check
+       kernel_is lt 2 6 5 && die 'requires at least 2.6.5 kernel version'
+}
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       linux-mod_pkg_setup
+       epatch "${FILESDIR}/${P}-makefile.patch"
+       epatch "${FILESDIR}/${P}-nosectorformat.patch"
+}
+
+src_compile() {
+       linux-mod_src_compile || die "Truecrypt module compilation failed."
+       cd "${S}/Linux/Cli"
+       einfo "Building truecrypt utility"
+       tc-export CC
+       # remove kernel linked crypt stuff
+       emake clean || die "make clean failed"
+       emake truecrypt || die "Compile and/or linking of TrueCrypt Linux CLI application failed."
+}
+
+src_test() {
+       "${S}/Linux/Cli/truecrypt" --test
+}
+
+pkg_preinst() {
+       # unload truecrypt modules if already loaded
+       /sbin/rmmod truecrypt >&- 2>&-
+       if grep -q "^truecrypt" /proc/modules
+       then
+               die "Please dismount all mounted TrueCrypt volumes"
+       fi
+}
+
+src_install() {
+       # installing files
+       dobin Linux/Cli/truecrypt
+       doman Linux/Cli/Man/truecrypt.1
+       dodoc Readme.txt 'Release/Setup Files/TrueCrypt User Guide.pdf'
+
+       # installing kernel module
+       linux-mod_src_install
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       einfo " For TrueCrypt 4.2 to work you have to load a "
+       einfo " kernel module. This can be done in three ways: "
+       einfo
+       einfo " 1. Loading the module automatically by the running kernel. "
+       einfo "    For this 'Automatic kernel module loading' needs to be "
+       einfo "    enabled (CONFIG_KMOD=y). "
+       einfo " 2. Loading the module manually before mounting the volume. "
+       einfo "    Try 'modprobe truecrypt' as root to load the module. "
+       einfo " 3. Load the module during boot by listing it in "
+       einfo "    '/etc/modules.autoload.d/kernel-2.6' "
+}
+
+dmcrypt_check() {
+       ebegin "Checking for Device mapper support (BLK_DEV_DM)"
+       linux_chkconfig_present BLK_DEV_DM
+       eend $?
+
+       if [[ $? -ne 0 ]] ; then
+               ewarn "TrueCrypt requires Device mapper support!"
+               ewarn "Please enable Device mapper support in your kernel config, found at:"
+               ewarn "(for 2.6 kernels)"
+               ewarn
+               ewarn "  Device Drivers"
+               ewarn "    Multi-Device Support"
+               ewarn "      <*> Device mapper support"
+               ewarn
+               ewarn "and recompile your kernel if you want this package to work."
+               epause 10
+       fi
+}
+