aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-07-14 11:25:09 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-07-14 13:58:15 +0200
commit179e5b5c4e6b9869d5a0f0dab21b875ab3a5a0f3 (patch)
tree4aa22966273125d4d8d0f3e38553b3fd9c032299 /gkbuilds
parentgen_initramfs.sh: Refactor append_devices() (diff)
downloadgenkernel-179e5b5c4e6b9869d5a0f0dab21b875ab3a5a0f3.tar.gz
genkernel-179e5b5c4e6b9869d5a0f0dab21b875ab3a5a0f3.tar.bz2
genkernel-179e5b5c4e6b9869d5a0f0dab21b875ab3a5a0f3.zip
Rework --dmraid support
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gkbuilds')
-rw-r--r--gkbuilds/dmraid.gkbuild31
1 files changed, 31 insertions, 0 deletions
diff --git a/gkbuilds/dmraid.gkbuild b/gkbuilds/dmraid.gkbuild
new file mode 100644
index 0000000..2c6810c
--- /dev/null
+++ b/gkbuilds/dmraid.gkbuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+src_prepare() {
+ # pkg_check_modules is not in aclocal.m4 by default, and autoreconf doesn't add it
+ cat /usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 \
+ || die "Failed to append '/usr/share/aclocal/pkg.m4' to '${S}/aclocal.m4'!"
+
+ default
+}
+
+src_configure() {
+ local myconf=(
+ --enable-static_link
+ )
+
+ gkconf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ "${STRIP}" --strip-all "${D}"/usr/sbin/dmraid \
+ || die "Failed to strip '${D}/usr/sbin/dmraid'!"
+
+ # For backward compatibility
+ mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!"
+
+ ln -s ../usr/sbin/dmraid "${D}"/sbin/dmraid \
+ || die "Failed to create symlink '${D}/sbin/dmraid' to '${D}/usr/sbin/dmraid'!"
+}