/[gentoo-x86]/sys-fs/cryptsetup/cryptsetup-1.0.6-r2.ebuild
Gentoo

Contents of /sys-fs/cryptsetup/cryptsetup-1.0.6-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Mon May 21 07:59:21 2012 UTC (2 years, 7 months ago) by ssuominen
Branch: MAIN
Changes since 1.14: +4 -3 lines
Silence repoman.

(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/cryptsetup-1.0.6-r2.ebuild,v 1.14 2009/08/31 15:05:29 armin76 Exp $
4
5 inherit linux-info eutils flag-o-matic multilib
6
7 DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
8 HOMEPAGE="http://luks.endorphin.org/ http://code.google.com/p/cryptsetup/"
9 SRC_URI="http://luks.endorphin.org/source/${P}.tar.bz2"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
14 IUSE="dynamic nls selinux"
15
16 RDEPEND="|| (
17 >=sys-fs/lvm2-2.02.45
18 >=sys-fs/device-mapper-1.00.07-r1
19 )
20 >=dev-libs/libgcrypt-1.1.42
21 >=dev-libs/libgpg-error-1.0-r1
22 >=dev-libs/popt-1.7
23 >=sys-fs/udev-124
24 || ( >=sys-libs/e2fsprogs-libs-1.41 <sys-fs/e2fsprogs-1.41 )
25 selinux? ( sys-libs/libselinux )
26 !sys-fs/cryptsetup-luks"
27 DEPEND="${RDEPEND}"
28
29 dm-crypt_check() {
30 local CONFIG_CHECK="~DM_CRYPT"
31 local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
32 check_extra_config
33 }
34
35 crypto_check() {
36 local CONFIG_CHECK="~CRYPTO"
37 local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
38 check_extra_config
39 }
40
41 cbc_check() {
42 local CONFIG_CHECK="~CRYPTO_CBC"
43 local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
44 check_extra_config
45 }
46
47 pkg_setup() {
48 dm-crypt_check
49 crypto_check
50 cbc_check
51
52 if use dynamic ; then
53 ewarn "If you need cryptsetup for an initrd or initramfs then you"
54 ewarn "should NOT use the dynamic USE flag"
55 epause 5
56 fi
57 }
58
59 src_unpack() {
60 unpack ${A}
61 cd "${S}"
62
63 # fix for bug #236481, use udevadm instead of udevsettle
64 epatch "${FILESDIR}"/${PN}-1.0.6-udevsettle.patch
65 }
66
67 src_compile() {
68 use selinux || export ac_cv_lib_selinux_is_selinux_enabled=no
69 econf \
70 --sbindir=/sbin \
71 $(use_enable !dynamic static) \
72 --libdir=/usr/$(get_libdir) \
73 $(use_enable nls) \
74 || die
75 emake || die
76 }
77
78 src_install() {
79 emake DESTDIR="${D}" install || die "install failed"
80 rmdir "${D}"/usr/$(get_libdir)/cryptsetup
81 insinto /$(get_libdir)/rcscripts/addons
82 newins "${FILESDIR}"/1.0.6-r2-dm-crypt-start.sh dm-crypt-start.sh || die
83 newins "${FILESDIR}"/1.0.5-dm-crypt-stop.sh dm-crypt-stop.sh || die
84 newconfd "${FILESDIR}"/1.0.6-dmcrypt.confd dmcrypt || die
85 newinitd "${FILESDIR}"/1.0.5-dmcrypt.rc dmcrypt || die
86 }
87
88 pkg_postinst() {
89 ewarn "This ebuild introduces a new set of scripts and configuration"
90 ewarn "than the last version. If you are currently using /etc/conf.d/cryptfs"
91 ewarn "then you *MUST* copy your old file to:"
92 ewarn "/etc/conf.d/dmcrypt"
93 ewarn "Or your encrypted partitions will *NOT* work."
94 elog "Please see the example for configuring a LUKS mountpoint"
95 elog "in /etc/conf.d/dmcrypt"
96 elog
97 elog "If you are using baselayout-2 then please do:"
98 elog "rc-update add dmcrypt boot"
99 elog "This version introduces a command line arguement 'key_timeout'."
100 elog "If you want the search for the removable key device to timeout"
101 elog "after 10 seconds add the following to your bootloader config:"
102 elog "key_timeout=10"
103 elog "A timeout of 0 will mean it will wait indefinitely."
104 }

  ViewVC Help
Powered by ViewVC 1.1.20