blob: c15f5aeb0b22ba98f35b65bb783e2fcb7d74c754 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Disk partition editing/resizing utility"
2HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
Andrew Geissler95ac1b82021-03-31 14:34:31 -05003DESCRIPTION = "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 Geissler82c905d2020-04-13 13:39:40 -05004LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
6SECTION = "console/tools"
Andrew Geisslerd1e89492021-02-12 15:35:20 -06007DEPENDS = "ncurses util-linux virtual/libiconv"
Andrew Geissler82c905d2020-04-13 13:39:40 -05008
9SRC_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 Geissler82c905d2020-04-13 13:39:40 -050013 file://run-ptest \
Andrew Geissler82c905d2020-04-13 13:39:40 -050014 "
15
Andrew Geisslerd1e89492021-02-12 15:35:20 -060016SRC_URI[md5sum] = "357d19387c6e7bc4a8a90fe2d015fe80"
17SRC_URI[sha256sum] = "e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342"
Andrew Geissler82c905d2020-04-13 13:39:40 -050018
19EXTRA_OECONF = "--disable-device-mapper"
20
21inherit autotools pkgconfig gettext texinfo ptest
22
Andrew Geisslerd1e89492021-02-12 15:35:20 -060023PACKAGECONFIG ?= "readline"
24PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
25
Andrew Geissler5a43b432020-06-13 10:46:56 -050026BBCLASSEXTEND = "native nativesdk"
Andrew Geissler82c905d2020-04-13 13:39:40 -050027
28do_compile_ptest() {
29 oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags
30}
31
32do_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 Geissler90fd73c2021-03-05 15:25:55 -060043 sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile
Andrew Geissler82c905d2020-04-13 13:39:40 -050044 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 Geisslerd1e89492021-02-12 15:35:20 -060050RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make gawk e2fsprogs-mke2fs python3-core"
Andrew Geisslerf0343792020-11-18 10:42:21 -060051RRECOMMENDS_${PN}-ptest = "kernel-module-scsi-debug"
Andrew Geissler82c905d2020-04-13 13:39:40 -050052RDEPENDS_${PN}-ptest_append_libc-glibc = "\
53 glibc-utils \
54 locale-base-en-us \
55 "
56
57inherit update-alternatives
58
59ALTERNATIVE_PRIORITY = "100"
60ALTERNATIVE_${PN} = "partprobe"
61ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe"