blob: b4819d8fbf708c4025287a937b2d1d9b9b7e2cfc [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 Bishop1a4b7ee2018-12-16 17:11:34 -080010SRCREV = "8f35db59ef83078f87879ec2828e0bb45719e0ef"
11SRC_URI = "git://git.code.sf.net/p/aufs/aufs-util;protocol=git;branch=aufs4.9 \
12 https://raw.githubusercontent.com/sfjro/aufs4-linux/aufs4.9/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 \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016SRC_URI[aufs_type.md5sum] = "b37129ef0703de72a852db7e48bdedc6"
17SRC_URI[aufs_type.sha256sum] = "7ff6566adb9c7a3b6862cdc85a690ab546f1d0bc81ddd595fd663c0a69031683"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050018
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019UPSTREAM_CHECK_COMMITS = "1"
20
21PV = "4.9+git${SRCPV}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050022
23S = "${WORKDIR}/git"
24
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025export HOSTCC = "${BUILD_CC}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050026do_configure_prepend() {
27 # Replace sbin,bin paths with bitbake environment
28 sed -i -e 's;install_sbin: Tgt = ${DESTDIR}/sbin;install_sbin: Tgt = ${DESTDIR}/${base_sbindir};' \
29 -e 's;install_ubin: Tgt = ${DESTDIR}/usr/sbin;install_sbin: Tgt = ${DESTDIR}/${bindir};' \
30 ${S}/Makefile
31}
32
Patrick Williamsb48b7b42016-08-17 15:04:38 -050033do_configure_append () {
34 install -d ${S}/include/linux/
35 cp ${WORKDIR}/aufs_type.h ${S}/include/linux/
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036 sed -i -e 's;__user;;' ${S}/include/linux/aufs_type.h
Patrick Williamsb48b7b42016-08-17 15:04:38 -050037}
38
39do_configure_append_class-target () {
40 for i in ver c2sh c2tmac; do
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041 cp ${STAGING_BINDIR_NATIVE}/aufs-util-${PV}/$i ${B}
Patrick Williamsb48b7b42016-08-17 15:04:38 -050042 done
43}
44
45do_compile () {
46 oe_runmake CPPFLAGS="-I${S}/include -I${S}/libau"
47}
48
49do_compile_class-native () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050050 oe_runmake tools CPPFLAGS="-I${S}/include -I${S}/libau" CC="${BUILD_CC}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050051}
52
53do_install () {
54 oe_runmake 'DESTDIR=${D}' install_sbin install_ubin install_etc
55}
56
57do_install_class-native () {
58 install -d ${D}${bindir}/aufs-util-${PV}
59 for i in ver c2sh c2tmac; do
60 install -m 755 $i ${D}${bindir}/aufs-util-${PV}/$i
61 done
62}
63
Brad Bishopc342db32019-05-15 21:57:59 -040064RRECOMMENDS_${PN}_class-target += "kernel-module-aufs"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050065
66BBCLASSEXTEND = "native"