blob: e8835398afad69e86adafa9c16de2043fb953a2d [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Utilities for manipulating filesystem extended attributes"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "Implement the ability for a user to attach name:value pairs to objects within the XFS filesystem."
3
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
5SECTION = "libs"
6
Patrick Williamsc0f7c042017-02-23 20:41:17 -06007DEPENDS = "virtual/libintl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00009LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
10LICENSE:${PN} = "GPL-2.0-or-later"
11LICENSE:lib${BPN} = "LGPL-2.1-or-later"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
Andrew Geissler4c19ea12020-10-27 13:52:24 -050013 file://doc/COPYING.LGPL;md5=b8d31f339300bc239d73461d68e77b9c \
Andrew Geissler82c905d2020-04-13 13:39:40 -050014 file://tools/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
16
Andrew Geissler82c905d2020-04-13 13:39:40 -050017SRC_URI = "${SAVANNAH_GNU_MIRROR}/attr/${BP}.tar.gz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018 file://run-ptest \
19"
20
Andrew Geissler82c905d2020-04-13 13:39:40 -050021inherit ptest update-alternatives autotools gettext
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
Andrew Geissler82c905d2020-04-13 13:39:40 -050023PACKAGES =+ "lib${BPN}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024
Patrick Williams520786c2023-06-25 16:20:36 -050025FILES:lib${BPN} = "${libdir}/lib*${SOLIBS} ${sysconfdir}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026
27ALTERNATIVE_PRIORITY = "100"
Patrick Williams213cb262021-08-07 19:21:33 -050028ALTERNATIVE:${PN} = "setfattr"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030
Brad Bishop19323692019-04-05 15:28:33 -040031PTEST_BUILD_HOST_FILES = "builddefs"
32PTEST_BUILD_HOST_PATTERN = "^RPM"
33
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034do_install_ptest() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050035 cp ${B}/Makefile ${D}${PTEST_PATH}
36 sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
37 -e 's|${DEBUG_PREFIX_MAP}||g' \
38 -e 's:${HOSTTOOLS_DIR}/::g' \
39 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
40 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
41 -i ${D}${PTEST_PATH}/Makefile
42
43 sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
44 sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
45 sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile
46 sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile
47 cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}
48 cp -rf ${S}/test/ ${D}${PTEST_PATH}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049}
50
Patrick Williams8e7b46e2023-05-01 14:19:06 -050051do_install_ptest:append:libc-musl() {
52 sed -i -e 's|f: Operation n|f: N|g' ${D}${PTEST_PATH}/test/attr.test
53}
54
Patrick Williams213cb262021-08-07 19:21:33 -050055RDEPENDS:${PN}-ptest = "attr \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050056 bash \
Andrew Geissler82c905d2020-04-13 13:39:40 -050057 coreutils \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050058 perl-module-constant \
Andrew Geissler82c905d2020-04-13 13:39:40 -050059 perl-module-filehandle \
60 perl-module-getopt-std \
61 perl-module-posix \
62 make \
63 perl \
64 gawk \
65 perl-module-cwd \
66 perl-module-file-basename \
67 perl-module-file-path \
68 perl-module-file-spec \
69 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050071BBCLASSEXTEND = "native nativesdk"