Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | require e2fsprogs.inc |
| 2 | |
| 3 | SRC_URI += "file://acinclude.m4 \ |
| 4 | file://remove.ldconfig.call.patch \ |
| 5 | file://quiet-debugfs.patch \ |
| 6 | file://run-ptest \ |
| 7 | file://ptest.patch \ |
| 8 | file://mkdir.patch \ |
| 9 | file://xattr_ordering.patch \ |
| 10 | file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ |
| 11 | " |
| 12 | |
| 13 | SRCREV = "0f26747167cc9d82df849b0aad387bf824f04544" |
| 14 | PV = "1.42.99+1.43+git${SRCPV}" |
| 15 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$" |
| 16 | |
| 17 | EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ |
| 18 | --enable-elf-shlibs --disable-libuuid --disable-uuidd \ |
| 19 | --disable-libblkid --enable-verbose-makecmds" |
| 20 | |
| 21 | EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs" |
| 22 | |
| 23 | PACKAGECONFIG ??= "" |
| 24 | PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse' |
| 25 | |
| 26 | do_configure_prepend () { |
| 27 | cp ${WORKDIR}/acinclude.m4 ${S}/ |
| 28 | } |
| 29 | |
| 30 | do_install () { |
| 31 | oe_runmake 'DESTDIR=${D}' install |
| 32 | oe_runmake 'DESTDIR=${D}' install-libs |
| 33 | # We use blkid from util-linux now so remove from here |
| 34 | rm -f ${D}${base_libdir}/libblkid* |
| 35 | rm -rf ${D}${includedir}/blkid |
| 36 | rm -f ${D}${base_libdir}/pkgconfig/blkid.pc |
| 37 | rm -f ${D}${base_sbindir}/blkid |
| 38 | rm -f ${D}${base_sbindir}/fsck |
| 39 | rm -f ${D}${base_sbindir}/findfs |
| 40 | |
| 41 | # e2initrd_helper and the pkgconfig files belong in libdir |
| 42 | if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then |
| 43 | install -d ${D}${libdir} |
| 44 | mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir} |
| 45 | mv ${D}${base_libdir}/pkgconfig ${D}${libdir} |
| 46 | fi |
| 47 | |
| 48 | oe_multilib_header ext2fs/ext2_types.h |
| 49 | install -d ${D}${base_bindir} |
| 50 | mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs |
| 51 | |
| 52 | install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/ |
| 53 | } |
| 54 | |
| 55 | # Need to find the right mke2fs.conf file |
| 56 | e2fsprogs_conf_fixup () { |
| 57 | for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev; do |
| 58 | create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf |
| 59 | done |
| 60 | } |
| 61 | |
| 62 | do_install_append_class-target() { |
| 63 | # Clean host path in compile_et, mk_cmds |
| 64 | sed -i -e "s,ET_DIR=\"${S}/lib/et\",ET_DIR=\"${datadir}/et\",g" ${D}${bindir}/compile_et |
| 65 | sed -i -e "s,SS_DIR=\"${S}/lib/ss\",SS_DIR=\"${datadir}/ss\",g" ${D}${bindir}/mk_cmds |
| 66 | } |
| 67 | |
| 68 | do_install_append_class-native() { |
| 69 | e2fsprogs_conf_fixup |
| 70 | } |
| 71 | |
| 72 | do_install_append_class-nativesdk() { |
| 73 | e2fsprogs_conf_fixup |
| 74 | } |
| 75 | |
| 76 | RDEPENDS_e2fsprogs = "e2fsprogs-badblocks" |
| 77 | RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck" |
| 78 | |
| 79 | PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs" |
| 80 | PACKAGES =+ "libcomerr libss libe2p libext2fs" |
| 81 | |
| 82 | FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*" |
| 83 | FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*" |
| 84 | FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf" |
| 85 | FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label" |
| 86 | FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks" |
| 87 | FILES_libcomerr = "${base_libdir}/libcom_err.so.*" |
| 88 | FILES_libss = "${base_libdir}/libss.so.*" |
| 89 | FILES_libe2p = "${base_libdir}/libe2p.so.*" |
| 90 | FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*" |
| 91 | FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so" |
| 92 | |
| 93 | ALTERNATIVE_${PN} = "chattr" |
| 94 | ALTERNATIVE_PRIORITY = "100" |
| 95 | ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr" |
| 96 | ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs" |
| 97 | |
| 98 | ALTERNATIVE_${PN}-doc = "fsck.8" |
| 99 | ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" |
| 100 | |
| 101 | RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash" |
| 102 | |
| 103 | do_compile_ptest() { |
| 104 | oe_runmake -C ${B}/tests |
| 105 | } |
| 106 | |
| 107 | do_install_ptest() { |
| 108 | cp -a ${B}/tests ${D}${PTEST_PATH}/test |
| 109 | cp -a ${S}/tests/* ${D}${PTEST_PATH}/test |
| 110 | sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect* |
| 111 | } |