1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils linux-mod
9 MY_P="${PN/aes/AES}-v${PV}"
11 DESCRIPTION="Linux kernel module to encrypt disk partitions with AES cipher"
12 HOMEPAGE="http://loop-aes.sourceforge.net/loop-AES.README"
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
17 KEYWORDS="amd64 ~arm ~hppa ~ppc ~sparc ~x86"
18 IUSE="cpu_flags_x86_aes extra-ciphers keyscrub cpu_flags_x86_padlock"
20 DEPEND="app-crypt/loop-aes-losetup"
23 S="${WORKDIR}/${MY_P}"
28 CONFIG_CHECK="!BLK_DEV_LOOP"
29 MODULE_NAMES="loop(block::tmp-d-kbuild)"
34 LINUX_SOURCE=\"${KERNEL_DIR}\" \
35 KBUILD_OUTPUT=\"${KBUILD_OUTPUT}\" \
36 USE_KBUILD=y MODINST=n RUNDM=n"
37 use cpu_flags_x86_aes && BUILD_PARAMS="${BUILD_PARAMS} INTELAES=y"
38 use keyscrub && BUILD_PARAMS="${BUILD_PARAMS} KEYSCRUB=y"
39 use cpu_flags_x86_padlock && BUILD_PARAMS="${BUILD_PARAMS} PADLOCK=y"
41 if use extra-ciphers; then
42 MODULE_NAMES="${MODULE_NAMES}
43 loop_blowfish(block::tmp-d-kbuild)
44 loop_serpent(block::tmp-d-kbuild)
45 loop_twofish(block::tmp-d-kbuild)"
46 BUILD_PARAMS="${BUILD_PARAMS} EXTRA_CIPHERS=y"
55 doman loop-aes-keygen.1
59 linux-mod_pkg_postinst
62 einfo "For more instructions take a look at examples in README at:"
63 einfo "'${EPREFIX}/usr/share/doc/${PF}'"
65 einfo "If you have a newer Intel processor (i5, i7), and you use AES"
66 einfo "you may want to consider using the aes-ni use flag. It will"
67 einfo "use your processors native AES instructions giving quite a speed"
72 ewarn "Please consider using loop-aes-losetup package instead of"
73 ewarn "util-linux[loop-aes], it will enable all loop-aes services"
74 ewarn "without patching util-linux package"
76 ewarn "In future only loop-aes-losetup will be available in portage"