parted_3.4.bb 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. SUMMARY = "Disk partition editing/resizing utility"
  2. HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
  3. DESCRIPTION = "GNU Parted manipulates partition tables. This is useful for creating space for new operating systems, reorganizing disk usage, copying data on hard disks and disk imaging."
  4. LICENSE = "GPLv3+"
  5. LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
  6. SECTION = "console/tools"
  7. DEPENDS = "ncurses util-linux virtual/libiconv"
  8. SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
  9. file://fix-doc-mandir.patch \
  10. file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \
  11. file://run-ptest \
  12. file://check-vfat.patch \
  13. "
  14. SRC_URI[md5sum] = "357d19387c6e7bc4a8a90fe2d015fe80"
  15. SRC_URI[sha256sum] = "e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342"
  16. EXTRA_OECONF = "--disable-device-mapper"
  17. inherit autotools pkgconfig gettext texinfo ptest
  18. PACKAGECONFIG ?= "readline"
  19. PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
  20. BBCLASSEXTEND = "native nativesdk"
  21. do_compile_ptest() {
  22. oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags
  23. }
  24. do_install_ptest() {
  25. t=${D}${PTEST_PATH}
  26. mkdir $t/build-aux
  27. cp ${S}/build-aux/test-driver $t/build-aux/
  28. cp -r ${S}/tests $t
  29. cp ${B}/tests/Makefile $t/tests/
  30. mkdir $t/lib
  31. cp ${B}/lib/config.h $t/lib
  32. sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile
  33. sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile
  34. sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile
  35. sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" $t/tests/Makefile
  36. sed -i "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" $t/tests/Makefile
  37. sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile
  38. sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile
  39. for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \
  40. do cp ${B}/tests/.libs/$i $t/tests/; \
  41. done
  42. sed -e 's| ../parted||' -i $t/tests/*.sh
  43. }
  44. RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup util-linux-mkswap python3 make gawk e2fsprogs-mke2fs e2fsprogs-tune2fs python3-core dosfstools"
  45. RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug kernel-module-loop kernel-module-vfat"
  46. RDEPENDS_${PN}-ptest_append_libc-glibc = "\
  47. glibc-utils \
  48. locale-base-en-us \
  49. "
  50. inherit update-alternatives
  51. ALTERNATIVE_PRIORITY = "100"
  52. ALTERNATIVE_${PN} = "partprobe"
  53. ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe"