aboutsummaryrefslogtreecommitdiff
blob: 57fc537db3af577dc062838b27f98f07be38bef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

src_configure() {
	export ac_cv_header_security_pam_misc_h=no
	export ac_cv_header_security_pam_appl_h=no

	# devicemapper needs to find udev
	append-ldflags -Wl,-rpath-link,${BROOT}/usr/lib

	local myconf=(
		--enable-internal-argon2
		--sbindir=/sbin
		--disable-nls
		--disable-selinux
		--disable-veritysetup
		--disable-cryptsetup-reencrypt
		--disable-integritysetup
		--enable-static=yes
		--enable-shared=no
		--enable-static-cryptsetup
		--enable-udev
		--with-crypto_backend=gcrypt
	)

	gkconf "${myconf[@]}"
}

src_install() {
	default

	rm -rf \
		"${D}"/sbin/* \
		"${D}"/usr/share/

	cp -a cryptsetup.static "${D}"/sbin/cryptsetup \
		|| die "Failed to copy '${S}/cryptsetup.static' to '${D}/sbin/cryptsetup'!"

	"${STRIP}" --strip-all "${D}"/sbin/cryptsetup \
		|| die "Failed to strip '${D}/sbin/cryptsetup'!"
}