1SUMMARY = "Utilities for managing LZMA compressed files" 2HOMEPAGE = "https://tukaani.org/xz/" 3DESCRIPTION = "XZ Utils is free general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils." 4SECTION = "base" 5 6# The source includes bits of PD, GPL-2.0, GPL-3.0, LGPL-2.1-or-later, but the 7# only file which is GPL-3.0 is an m4 macro which isn't shipped in any of our 8# packages, and the LGPL bits are under lib/, which appears to be used for 9# libgnu, which appears to be used for DOS builds. So we're left with 10# GPL-2.0-or-later and PD. 11LICENSE = "GPL-2.0-or-later & GPL-3.0-with-autoconf-exception & LGPL-2.1-or-later & PD" 12LICENSE:${PN} = "GPL-2.0-or-later" 13LICENSE:${PN}-dev = "GPL-2.0-or-later" 14LICENSE:${PN}-staticdev = "GPL-2.0-or-later" 15LICENSE:${PN}-doc = "GPL-2.0-or-later" 16LICENSE:${PN}-dbg = "GPL-2.0-or-later" 17LICENSE:${PN}-locale = "GPL-2.0-or-later" 18LICENSE:liblzma = "PD" 19 20LIC_FILES_CHKSUM = "file://COPYING;md5=d4378ea9d5d1fc9ab0ae10d7948827d9 \ 21 file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 22 file://COPYING.GPLv3;md5=1ebbd3e34237af26da5dc08a4e440464 \ 23 file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ 24 file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 \ 25 " 26 27SRC_URI = "https://github.com/tukaani-project/xz/releases/download/v${PV}/xz-${PV}.tar.gz \ 28 file://run-ptest \ 29 " 30SRC_URI[sha256sum] = "aeba3e03bf8140ddedf62a0a367158340520f6b384f75ca6045ccc6c0d43fd5c" 31UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)" 32UPSTREAM_CHECK_URI = "https://github.com/tukaani-project/xz/releases/" 33 34CACHED_CONFIGUREVARS += "gl_cv_posix_shell=/bin/sh" 35 36inherit autotools gettext ptest 37 38PACKAGES =+ "liblzma" 39 40FILES:liblzma = "${libdir}/liblzma*${SOLIBS}" 41 42inherit update-alternatives 43ALTERNATIVE_PRIORITY = "100" 44ALTERNATIVE:${PN} = "xz xzcat unxz \ 45 lzma lzcat unlzma" 46 47BBCLASSEXTEND = "native nativesdk" 48 49RDEPENDS:${PN}-ptest += "bash file" 50 51do_compile_ptest() { 52 oe_runmake check TESTS= 53} 54 55do_install_ptest () { 56 install -d ${D}${PTEST_PATH}/tests 57 find ${B}/tests/.libs -type f -executable -exec cp {} ${D}${PTEST_PATH}/tests \; 58 cp ${B}/config.h ${D}${PTEST_PATH} 59 for i in files xzgrep_expected_output test_files.sh test_scripts.sh test_compress.sh; do 60 cp -r ${S}/tests/$i ${D}${PTEST_PATH}/tests 61 done 62 mkdir -p ${D}${PTEST_PATH}/src/xz 63 ln -s ${bindir}/xz ${D}${PTEST_PATH}/src/xz/xz 64 mkdir -p ${D}${PTEST_PATH}/src/xzdec 65 ln -s ${bindir}/xzdec ${D}${PTEST_PATH}/src/xzdec/xzdec 66 mkdir -p ${D}${PTEST_PATH}/src/scripts 67 ln -s ${bindir}/xzdiff ${D}${PTEST_PATH}/src/scripts/xzdiff 68 ln -s ${bindir}/xzgrep ${D}${PTEST_PATH}/src/scripts/xzgrep 69} 70