1 DESCRIPTION = "EXT2 Filesystem Utilities"
2 HOMEPAGE = "http://e2fsprogs.sf.net"
5 DEPENDS = "gettext-native util-linux-ng"
6 DEPENDS_virtclass-native = "gettext-native util-linux-ng-native"
8 SRC_URI = "${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-${PV}.tar.gz"
10 S = "${WORKDIR}/e2fsprogs-${PV}"
16 #if uclibc ntpl is merged into trunk we can enable tls for armv4 again
17 EXTRA_OECONF = "${@['','--disable-tls'][bb.data.getVar('ARM_ABI', d, 1) == 'oabi' and \
18 bb.data.getVar('TARGET_OS', d, 1).find('uclibc') >= 0 ]} \
20 --enable-dynamic-e2fsck --disable-nls --sbindir=${base_sbindir} \
21 --disable-libuuid --disable-libblkid --disable-fsck"
25 do_compile_prepend () {
26 find ./ -print|xargs chmod u=rwX
27 ( cd util; ${BUILD_CC} subst.c -o subst )
30 do_install_append () {
32 oe_runmake install-libs DESTDIR=${D}
34 mv ${D}${base_sbindir}/e2fsck ${D}${base_sbindir}/e2fsck.${PN}
35 rm ${D}${base_sbindir}/fsck.ext2
36 rm ${D}${base_sbindir}/fsck.ext3
37 rm ${D}${base_sbindir}/fsck.ext4*
38 mv ${D}${base_sbindir}/mke2fs ${D}${base_sbindir}/mke2fs.${PN}
39 rm ${D}${base_sbindir}/mkfs.ext2
40 rm ${D}${base_sbindir}/mkfs.ext3
41 rm ${D}${base_sbindir}/mkfs.ext4*
43 cd ${D}/${base_sbindir}
44 ln -sf ./e2fsck.${PN} fsck.ext2.${PN}
45 ln -sf ./e2fsck.${PN} fsck.ext3.${PN}
46 ln -sf ./e2fsck.${PN} fsck.ext4.${PN}
47 ln -sf ./e2fsck.${PN} fsck.ext4dev.${PN}
48 ln -sf ./mke2fs.${PN} mkfs.ext2.${PN}
49 ln -sf ./mke2fs.${PN} mkfs.ext3.${PN}
50 ln -sf ./mke2fs.${PN} mkfs.ext4.${PN}
51 ln -sf ./mke2fs.${PN} mkfs.ext4dev.${PN}
53 ln -sf ./tune2fs findfs
54 ln -sf ./tune2fs e2label
56 mv ${D}${bindir}/chattr ${D}${bindir}/chattr.${PN}
59 pkg_postinst_e2fsprogs () {
60 update-alternatives --install ${base_bindir}/chattr chattr chattr.${PN} 100
63 pkg_prerm_e2fsprogs () {
64 update-alternatives --remove chattr chattr.${PN}
68 pkg_postinst_e2fsprogs-blkid () {
69 update-alternatives --install ${base_sbindir}/blkid blkid blkid.${PN} 100
72 pkg_prerm_e2fsprogs-blkid () {
73 update-alternatives --remove blkid blkid.${PN}
76 pkg_postinst_e2fsprogs-e2fsck () {
77 update-alternatives --install ${base_sbindir}/e2fsck e2fsck e2fsck.${PN} 100
78 update-alternatives --install ${base_sbindir}/fsck.ext2 fsck.ext2 fsck.ext2.${PN} 100
79 update-alternatives --install ${base_sbindir}/fsck.ext3 fsck.ext3 fsck.ext3.${PN} 100
80 update-alternatives --install ${base_sbindir}/fsck.ext4 fsck.ext4 fsck.ext4.${PN} 100
81 update-alternatives --install ${base_sbindir}/fsck.ext4dev fsck.ext4dev fsck.ext4dev.${PN} 100
84 pkg_prerm_e2fsprogs-e2fsck () {
85 update-alternatives --remove e2fsck e2fsck.${PN}
86 update-alternatives --remove fsck.ext2 fsck.ext2.${PN}
87 update-alternatives --remove fsck.ext3 fsck.ext3.${PN}
88 update-alternatives --remove fsck.ext4 fsck.ext4.${PN}
89 update-alternatives --remove fsck.ext4dev fsck.ext4dev.${PN}
92 pkg_postinst_e2fsprogs-mke2fs () {
93 update-alternatives --install ${base_sbindir}/mke2fs mke2fs mke2fs.${PN} 100
94 update-alternatives --install ${base_sbindir}/mkfs.ext2 mkfs.ext2 mkfs.ext2.${PN} 100
95 update-alternatives --install ${base_sbindir}/mkfs.ext3 mkfs.ext3 mkfs.ext3.${PN} 100
96 update-alternatives --install ${base_sbindir}/mkfs.ext4 mkfs.ext4 mkfs.ext4.${PN} 100
97 update-alternatives --install ${base_sbindir}/mkfs.ext4dev mkfs.ext4dev mkfs.ext4dev.${PN} 100
100 pkg_prerm_e2fsprogs-mke2fs () {
101 update-alternatives --remove mke2fs mke2fs.${PN}
102 update-alternatives --remove mkfs.ext2 mkfs.ext2.${PN}
103 update-alternatives --remove mkfs.ext3 mkfs.ext3.${PN}
104 update-alternatives --remove mkfs.ext4 mkfs.ext4.${PN}
105 update-alternatives --remove mkfs.ext4dev mkfs.ext4dev.${PN}
108 # blkid used to be part of e2fsprogs but is useful outside, add it
109 # as an RDEPENDS so that anything relying on it being in e2fsprogs
111 RDEPENDS_e2fsprogs = "util-linux-ng e2fsprogs-badblocks"
113 FILES_${PN} += "${libdir}/e2initrd_helper"
115 PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks libcomerr libss"
116 FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck.${PN} ${base_sbindir}/fsck.ext*.${PN}"
117 FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs.${PN} ${base_sbindir}/mkfs.ext*.${PN}"
118 FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label ${base_sbindir}/findfs"
119 FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
120 FILES_libcomerr = "${libdir}/libcom_err.so.*"
121 FILES_libss = "${libdir}/libss.so.*"
123 BBCLASSEXTEND = "native"