/[gentoo-x86]/sys-fs/cryptsetup/cryptsetup-1.4.1-r1.ebuild
Gentoo

Contents of /sys-fs/cryptsetup/cryptsetup-1.4.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri May 11 08:31:51 2012 UTC (2 years, 7 months ago) by vapier
Branch: MAIN
Changes since 1.4: +2 -2 lines
Rename stable dmcrypt init.d so updates can land for newer versions.

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.4.1-r1.ebuild,v 1.4 2012/05/11 08:13:59 vapier Exp $
4
5 EAPI="4"
6
7 inherit linux-info libtool
8
9 MY_P=${P/_rc/-rc}
10 DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
11 HOMEPAGE="http://code.google.com/p/cryptsetup/"
12 SRC_URI="http://cryptsetup.googlecode.com/files/${MY_P}.tar.bz2"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
17 IUSE="nls selinux static"
18
19 S=${WORKDIR}/${MY_P}
20
21 LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
22 >=dev-libs/popt-1.7[static-libs(+)]
23 >=sys-apps/util-linux-2.17.2[static-libs(+)]
24 >=dev-libs/libgcrypt-1.1.42[static-libs(+)]
25 >=sys-fs/lvm2-2.02.64[static-libs(+)]
26 >=sys-fs/udev-124[static-libs(+)]
27 >=sys-libs/e2fsprogs-libs-1.41[static-libs(+)]"
28 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
29 !<sys-apps/baselayout-2
30 !sys-fs/cryptsetup-luks
31 selinux? ( sys-libs/libselinux )"
32 DEPEND="${RDEPEND}
33 static? ( ${LIB_DEPEND} )"
34
35 pkg_setup() {
36 local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC"
37 local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
38 local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
39 local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
40 check_extra_config
41 }
42
43 src_prepare() {
44 sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test
45 elibtoolize
46 }
47
48 src_configure() {
49 econf \
50 --sbindir=/sbin \
51 --enable-shared \
52 $(use_enable static static-cryptsetup) \
53 $(use_enable nls) \
54 $(use_enable selinux)
55 }
56
57 src_test() {
58 if [[ ! -e /dev/mapper/control ]] ; then
59 ewarn "No /dev/mapper/control found -- skipping tests"
60 return 0
61 fi
62 local p
63 for p in /dev/mapper /dev/loop* ; do
64 addwrite ${p}
65 done
66 default
67 }
68
69 src_install() {
70 emake DESTDIR="${D}" install
71 use static && { mv "${D}"/sbin/cryptsetup{.static,} || die ; }
72 dodoc TODO ChangeLog README NEWS
73
74 newconfd "${FILESDIR}"/1.0.6-dmcrypt.confd dmcrypt
75 newinitd "${FILESDIR}"/1.4.1-dmcrypt.rc dmcrypt
76 }
77
78 pkg_postinst() {
79 ewarn "This ebuild introduces a new set of scripts and configuration"
80 ewarn "than the last version. If you are currently using /etc/conf.d/cryptfs"
81 ewarn "then you *MUST* copy your old file to:"
82 ewarn "/etc/conf.d/dmcrypt"
83 ewarn "Or your encrypted partitions will *NOT* work."
84 elog "Please see the example for configuring a LUKS mountpoint"
85 elog "in /etc/conf.d/dmcrypt"
86 elog
87 elog "If you are using baselayout-2 then please do:"
88 elog "rc-update add dmcrypt boot"
89 elog "This version introduces a command line arguement 'key_timeout'."
90 elog "If you want the search for the removable key device to timeout"
91 elog "after 10 seconds add the following to your bootloader config:"
92 elog "key_timeout=10"
93 elog "A timeout of 0 will mean it will wait indefinitely."
94 elog
95 elog "Users using cryptsetup-1.0.x (dm-crypt plain) volumes must use"
96 elog "a compatibility mode when using cryptsetup-1.1.x. This can be"
97 elog "done by specifying the cipher (-c), key size (-s) and hash (-h)."
98 elog "For more info, see http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#6._Issues_with_Specific_Versions_of_cryptsetup"
99 }

  ViewVC Help
Powered by ViewVC 1.1.20