aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-07-14 11:43:59 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-07-14 13:58:16 +0200
commit3d071ae86e9b3a08250382f970b2eaea0db85090 (patch)
tree08168b25ce7d0101c7d139d217cf04321c0bcfb5 /gkbuilds
parentRework --mdadm support (diff)
downloadgenkernel-3d071ae86e9b3a08250382f970b2eaea0db85090.tar.gz
genkernel-3d071ae86e9b3a08250382f970b2eaea0db85090.tar.bz2
genkernel-3d071ae86e9b3a08250382f970b2eaea0db85090.zip
Rework --luks support
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gkbuilds')
-rw-r--r--gkbuilds/cryptsetup.gkbuild33
-rw-r--r--gkbuilds/json-c.gkbuild2
-rw-r--r--gkbuilds/libgcrypt.gkbuild46
-rw-r--r--gkbuilds/libgpg-error.gkbuild81
-rw-r--r--gkbuilds/popt.gkbuild16
5 files changed, 178 insertions, 0 deletions
diff --git a/gkbuilds/cryptsetup.gkbuild b/gkbuilds/cryptsetup.gkbuild
new file mode 100644
index 0000000..a99ce28
--- /dev/null
+++ b/gkbuilds/cryptsetup.gkbuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2019 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
+
+ local myconf=(
+ --enable-internal-argon2
+ --sbindir=/sbin
+ --disable-nls
+ --enable-static=yes
+ --enable-shared=no
+ --enable-static-cryptsetup
+ --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'!"
+}
diff --git a/gkbuilds/json-c.gkbuild b/gkbuilds/json-c.gkbuild
new file mode 100644
index 0000000..c103679
--- /dev/null
+++ b/gkbuilds/json-c.gkbuild
@@ -0,0 +1,2 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
diff --git a/gkbuilds/libgcrypt.gkbuild b/gkbuilds/libgcrypt.gkbuild
new file mode 100644
index 0000000..a6686d3
--- /dev/null
+++ b/gkbuilds/libgcrypt.gkbuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+src_configure() {
+ export ac_cv_sys_symbol_underscore=no
+
+ local myconf=(
+ --enable-static=yes
+ --disable-padlock-support
+ --enable-static=yes
+ )
+
+ gkconf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ rm -rf \
+ "${D}"/usr/bin/dumpsexp \
+ "${D}"/usr/bin/hmac256 \
+ "${D}"/usr/bin/mpicalc \
+ "${D}"/usr/share
+
+ # libgcrypt-config tries to be smart and will omit include
+ # and lib dir due to set prefix
+ sed -i \
+ -e "s|/usr/include|/dont-try-to-be-smart|" \
+ -e "s|/usr/lib|/dont-try-to-be-smart|" \
+ "${D}"/usr/bin/libgcrypt-config \
+ || die "Failed to make libgcrypt-config dumb!"
+
+ mv "${D}"/usr/bin/libgcrypt-config "${D}"/usr/bin/libgcrypt-config.ori \
+ || die "Failed to rename '${D}/usr/bin/libgcrypt-config' to '${D}/usr/bin/libgcrypt-config.ori'!"
+
+ cat >"${D}"/usr/bin/libgcrypt-config <<-EOF
+ #!/bin/sh
+
+ SYSROOT=\$(dirname "\$(dirname "\$(dirname "\$(readlink -fm "\$0")")")")
+
+ exec "\${SYSROOT}"/usr/bin/libgcrypt-config.ori "\$@" | sed -e 's#/#'\${SYSROOT}'/#'
+ EOF
+
+ chmod +x "${D}"/usr/bin/libgcrypt-config \
+ || die "Failed to chmod of '${D}/bin/libgcrypt-config'!"
+}
diff --git a/gkbuilds/libgpg-error.gkbuild b/gkbuilds/libgpg-error.gkbuild
new file mode 100644
index 0000000..7b74bb9
--- /dev/null
+++ b/gkbuilds/libgpg-error.gkbuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+src_prepare() {
+ if [[ ! -f "${S}/src/syscfg/lock-obj-pub.${CHOST}.h" ]]
+ then
+ print_warning 3 "CHOST '${CHOST}' not known by ${P} -- workaround for bug 584052 needed ..."
+ local CHOST_KNOWN=
+ local -a CHOST_ARRAY=( ${CHOST//-/ } )
+
+ i=0
+ while [[ ${i} -lt ${#CHOST_ARRAY[@]} ]]
+ do
+ if [[ ${i} -eq 0 ]]
+ then
+ case "${CHOST_ARRAY[${i}]}" in
+ arm*)
+ CHOST_ARRAY[${i}]=arm
+ ;;
+ esac
+ elif [[ ${i} -eq 1 && "${CHOST_ARRAY[${i}]}" != "unknown" ]]
+ then
+ CHOST_ARRAY[${i}]=unknown
+ fi
+
+ if [[ ${CHOST_KNOWN} != "*${CHOST_ARRAY[${i}]}*" ]]
+ then
+ CHOST_KNOWN+="${CHOST_ARRAY[${i}]}-"
+ fi
+
+ i=$((i + 1))
+ done
+
+ CHOST_KNOWN=${CHOST_KNOWN%-}
+ if [[ ! -f "${S}/src/syscfg/lock-obj-pub.${CHOST_KNOWN}.h" ]]
+ then
+ print_warning 3 "We tried our best but even '${CHOST_KNOWN}' looks unknown -- good luck!"
+ else
+ export CHOST=${CHOST_KNOWN}
+ print_warning 3 "CHOST set to '${CHOST_KNOWN}'!"
+ fi
+ fi
+
+ default
+}
+
+src_configure() {
+ local myconf=(
+ --disable-nls
+ --enable-static
+ )
+
+ gkconf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ rm -rf \
+ "${D}"/usr/bin/gpg-error \
+ "${D}"/usr/bin/gpgrt-config \
+ "${D}"/usr/bin/yat2m \
+ "${D}"/usr/share
+
+ mv "${D}"/usr/bin/gpg-error-config "${D}"/usr/bin/gpg-error-config.ori \
+ || die "Failed to rename '${D}/usr/bin/gpg-error-config' to '${D}/usr/bin/gpg-error-config.ori'!"
+
+ cat >"${D}"/usr/bin/gpg-error-config <<-EOF
+ #!/bin/sh
+
+ SYSROOT=\$(dirname "\$(dirname "\$(dirname "\$(readlink -fm "\$0")")")")
+
+ exec "\${SYSROOT}"/usr/bin/gpg-error-config.ori "\$@" | sed -e 's#/#'\${SYSROOT}'/#'
+ EOF
+
+ chmod +x "${D}"/usr/bin/gpg-error-config \
+ || die "Failed to chmod of '${D}/bin/gpg-error-config'!"
+
+ ln -s gpg-error-config "${D}"/usr/bin/gpgrt-config \
+ || die "Failed to symlink '${D}/bin/gpgrt-config' to '${D}/bin/gpg-error-config'!"
+}
diff --git a/gkbuilds/popt.gkbuild b/gkbuilds/popt.gkbuild
new file mode 100644
index 0000000..9bfb560
--- /dev/null
+++ b/gkbuilds/popt.gkbuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+src_configure() {
+ local myconf=(
+ --disable-nls
+ )
+
+ gkconf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ rm -rf "${D}"/usr/share
+}