xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.2.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Checksumming Copy on Write Filesystem utilities"
2*4882a593SmuzhiyunDESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
3*4882a593Smuzhiyunimplementing advanced features while focusing on fault tolerance, repair and \
4*4882a593Smuzhiyuneasy administration. \
5*4882a593SmuzhiyunThis package contains utilities (mkfs, fsck, btrfsctl) used to work with \
6*4882a593Smuzhiyunbtrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunHOMEPAGE = "https://btrfs.wiki.kernel.org"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunLICENSE = "GPL-2.0-only & LGPL-2.1-or-later"
11*4882a593SmuzhiyunLIC_FILES_CHKSUM = " \
12*4882a593Smuzhiyun    file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067 \
13*4882a593Smuzhiyun    file://libbtrfsutil/COPYING;md5=4fbd65380cdd255951079008b364516c \
14*4882a593Smuzhiyun"
15*4882a593SmuzhiyunSECTION = "base"
16*4882a593SmuzhiyunDEPENDS = "lzo util-linux zlib"
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunSRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \
19*4882a593Smuzhiyun           file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
20*4882a593Smuzhiyun           "
21*4882a593SmuzhiyunSRCREV = "31458c9c81935abbed010221261897273a98d2c1"
22*4882a593SmuzhiyunS = "${WORKDIR}/git"
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunPACKAGECONFIG ??= " \
25*4882a593Smuzhiyun    programs \
26*4882a593Smuzhiyun    convert \
27*4882a593Smuzhiyun    python \
28*4882a593Smuzhiyun    crypto-builtin \
29*4882a593Smuzhiyun"
30*4882a593SmuzhiyunPACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
31*4882a593SmuzhiyunPACKAGECONFIG[programs] = "--enable-programs,--disable-programs"
32*4882a593SmuzhiyunPACKAGECONFIG[convert] = "--enable-convert --with-convert=ext2,--disable-convert --without-convert,e2fsprogs"
33*4882a593SmuzhiyunPACKAGECONFIG[zoned] = "--enable-zoned,--disable-zoned"
34*4882a593SmuzhiyunPACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native"
35*4882a593SmuzhiyunPACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd"
36*4882a593SmuzhiyunPACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev"
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun# Pick only one crypto provider
39*4882a593SmuzhiyunPACKAGECONFIG[crypto-builtin] = "--with-crypto=builtin"
40*4882a593SmuzhiyunPACKAGECONFIG[crypto-libgcrypt] = "--with-crypto=libgcrypt,,libgcrypt"
41*4882a593SmuzhiyunPACKAGECONFIG[crypto-libsodium] = "--with-crypto=libsodium,,libsodium"
42*4882a593SmuzhiyunPACKAGECONFIG[crypto-libkcapi] = "--with-crypto=libkcapi,,libkcapi"
43*4882a593Smuzhiyun
44*4882a593Smuzhiyuninherit autotools-brokensep pkgconfig manpages
45*4882a593Smuzhiyuninherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3-base', '', d)}
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunCLEANBROKEN = "1"
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunEXTRA_OECONF = "--enable-largefile"
50*4882a593SmuzhiyunEXTRA_OECONF:append:libc-musl = " --disable-backtrace "
51*4882a593SmuzhiyunEXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}"
52*4882a593SmuzhiyunEXTRA_PYTHON_CFLAGS:class-native = ""
53*4882a593SmuzhiyunEXTRA_PYTHON_LDFLAGS = "${LDFLAGS}"
54*4882a593SmuzhiyunEXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'"
55*4882a593Smuzhiyun
56*4882a593Smuzhiyundo_configure:prepend() {
57*4882a593Smuzhiyun	# Upstream doesn't ship this and autoreconf won't install it as automake isn't used.
58*4882a593Smuzhiyun	mkdir -p ${S}/config
59*4882a593Smuzhiyun	cp -f $(automake --print-libdir)/install-sh ${S}/config/
60*4882a593Smuzhiyun}
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun
63*4882a593Smuzhiyundo_install:append() {
64*4882a593Smuzhiyun    if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
65*4882a593Smuzhiyun        oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python
66*4882a593Smuzhiyun    fi
67*4882a593Smuzhiyun}
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunRDEPENDS:${PN} = "libgcc"
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
72