Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Tool for managing software RAID under Linux" |
| 2 | HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" |
| 3 | |
| 4 | # Some files are GPLv2+ while others are GPLv2. |
| 5 | LICENSE = "GPLv2 & GPLv2+" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
| 7 | file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ |
| 8 | file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" |
| 9 | |
| 10 | |
| 11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ |
| 12 | file://mdadm-3.2.2_fix_for_x32.patch \ |
| 13 | file://gcc-4.9.patch \ |
| 14 | file://mdadm-3.3.2_x32_abi_time_t.patch \ |
| 15 | file://0001-Fix-typo-in-comparision.patch \ |
| 16 | file://run-ptest \ |
| 17 | " |
| 18 | SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09" |
| 19 | SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68" |
| 20 | |
| 21 | CFLAGS += "-fno-strict-aliasing" |
| 22 | |
| 23 | inherit autotools-brokensep |
| 24 | |
| 25 | EXTRA_OEMAKE = "CHECK_RUN_DIR=0" |
| 26 | # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h |
| 27 | # prevents 64-bit userland from seeing this definition, instead defaulting |
| 28 | # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get |
| 29 | # int-ll64.h included |
| 30 | EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' |
| 31 | EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' |
| 32 | EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' |
| 33 | |
| 34 | do_compile() { |
| 35 | oe_runmake |
| 36 | } |
| 37 | |
| 38 | do_install() { |
| 39 | export STRIP="" |
| 40 | autotools_do_install |
| 41 | } |
| 42 | |
| 43 | FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" |
| 44 | |
| 45 | inherit ptest |
| 46 | |
| 47 | do_compile_ptest() { |
| 48 | oe_runmake test |
| 49 | } |
| 50 | |
| 51 | do_install_ptest() { |
| 52 | cp -a ${S}/tests ${D}${PTEST_PATH}/tests |
| 53 | cp ${S}/test ${D}${PTEST_PATH} |
| 54 | sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test |
| 55 | ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm |
| 56 | for prg in test_stripe swap_super raid6check |
| 57 | do |
| 58 | install -D -m 755 $prg ${D}${PTEST_PATH}/ |
| 59 | done |
| 60 | } |
| 61 | RDEPENDS_${PN}-ptest += "bash" |
| 62 | RRECOMMENDS_${PN}-ptest += " \ |
| 63 | coreutils \ |
| 64 | util-linux \ |
| 65 | kernel-module-loop \ |
| 66 | kernel-module-linear \ |
| 67 | kernel-module-raid0 \ |
| 68 | kernel-module-raid1 \ |
| 69 | kernel-module-raid10 \ |
| 70 | kernel-module-raid456 \ |
| 71 | " |