Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Disk partition editing/resizing utility" |
| 2 | HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 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." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 4 | LICENSE = "GPLv3+" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" |
| 6 | SECTION = "console/tools" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7 | DEPENDS = "ncurses util-linux virtual/libiconv" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | |
| 9 | SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ |
| 10 | file://no_check.patch \ |
| 11 | file://fix-doc-mandir.patch \ |
| 12 | file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | file://run-ptest \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | " |
| 15 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 16 | SRC_URI[md5sum] = "357d19387c6e7bc4a8a90fe2d015fe80" |
| 17 | SRC_URI[sha256sum] = "e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | |
| 19 | EXTRA_OECONF = "--disable-device-mapper" |
| 20 | |
| 21 | inherit autotools pkgconfig gettext texinfo ptest |
| 22 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 23 | PACKAGECONFIG ?= "readline" |
| 24 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" |
| 25 | |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 26 | BBCLASSEXTEND = "native nativesdk" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | |
| 28 | do_compile_ptest() { |
| 29 | oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags |
| 30 | } |
| 31 | |
| 32 | do_install_ptest() { |
| 33 | t=${D}${PTEST_PATH} |
| 34 | mkdir $t/build-aux |
| 35 | cp ${S}/build-aux/test-driver $t/build-aux/ |
| 36 | cp -r ${S}/tests $t |
| 37 | cp ${B}/tests/Makefile $t/tests/ |
| 38 | sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile |
| 39 | sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile |
| 40 | sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile |
| 41 | sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" $t/tests/Makefile |
| 42 | sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 43 | sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 44 | for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \ |
| 45 | do cp ${B}/tests/.libs/$i $t/tests/; \ |
| 46 | done |
| 47 | sed -e 's| ../parted||' -i $t/tests/*.sh |
| 48 | } |
| 49 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 50 | RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make gawk e2fsprogs-mke2fs python3-core" |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 51 | RRECOMMENDS_${PN}-ptest = "kernel-module-scsi-debug" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 52 | RDEPENDS_${PN}-ptest_append_libc-glibc = "\ |
| 53 | glibc-utils \ |
| 54 | locale-base-en-us \ |
| 55 | " |
| 56 | |
| 57 | inherit update-alternatives |
| 58 | |
| 59 | ALTERNATIVE_PRIORITY = "100" |
| 60 | ALTERNATIVE_${PN} = "partprobe" |
| 61 | ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe" |