blob: 2e855e3135d6d3a78f2168142ec06cc08ebc405d [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "Tools for managing AUFS mounts"
2SECTION = "base"
3HOMEPAGE = "http://aufs.sourceforge.net/"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
6
Brad Bishopd7bf8c12018-02-25 22:55:05 -05007DEPENDS = "coreutils-native aufs-util-native"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05008DEPENDS_class-native = ""
9
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010SRCREV = "89afb1806c3d2eed8db2666ae254b77518ae3ceb"
11SRC_URI = "git://git.code.sf.net/p/aufs/aufs-util;protocol=git;branch=aufs4.4 \
12 https://raw.githubusercontent.com/sfjro/aufs4-linux/aufs4.4/include/uapi/linux/aufs_type.h;name=aufs_type \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050013 file://aufs-util-don-t-strip-executables.patch \
14 file://aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050015 file://0001-libau-Define-STRIP-weakly.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050016"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017SRC_URI[aufs_type.md5sum] = "f7b4a255dcb55fe7b0967f5f59b44f19"
18SRC_URI[aufs_type.sha256sum] = "85bc8e4c1a94a7d526c382e4b047b4256cab8c4a65fc0396291707ad9a327a18"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050019
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020PV = "4.4+git${SRCPV}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050021
22S = "${WORKDIR}/git"
23
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024export HOSTCC = "${BUILD_CC}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025do_configure_prepend() {
26 # Replace sbin,bin paths with bitbake environment
27 sed -i -e 's;install_sbin: Tgt = ${DESTDIR}/sbin;install_sbin: Tgt = ${DESTDIR}/${base_sbindir};' \
28 -e 's;install_ubin: Tgt = ${DESTDIR}/usr/sbin;install_sbin: Tgt = ${DESTDIR}/${bindir};' \
29 ${S}/Makefile
30}
31
Patrick Williamsb48b7b42016-08-17 15:04:38 -050032do_configure_append () {
33 install -d ${S}/include/linux/
34 cp ${WORKDIR}/aufs_type.h ${S}/include/linux/
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035 sed -i -e 's;__user;;' ${S}/include/linux/aufs_type.h
Patrick Williamsb48b7b42016-08-17 15:04:38 -050036}
37
38do_configure_append_class-target () {
39 for i in ver c2sh c2tmac; do
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040 cp ${STAGING_BINDIR_NATIVE}/aufs-util-${PV}/$i ${B}
Patrick Williamsb48b7b42016-08-17 15:04:38 -050041 done
42}
43
44do_compile () {
45 oe_runmake CPPFLAGS="-I${S}/include -I${S}/libau"
46}
47
48do_compile_class-native () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050049 oe_runmake tools CPPFLAGS="-I${S}/include -I${S}/libau" CC="${BUILD_CC}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050050}
51
52do_install () {
53 oe_runmake 'DESTDIR=${D}' install_sbin install_ubin install_etc
54}
55
56do_install_class-native () {
57 install -d ${D}${bindir}/aufs-util-${PV}
58 for i in ver c2sh c2tmac; do
59 install -m 755 $i ${D}${bindir}/aufs-util-${PV}/$i
60 done
61}
62
63RRECOMMENDS_${PN} += "kernel-module-aufs"
64
65BBCLASSEXTEND = "native"