blob: ea2b68bbd81df2156a07b440c266e8196a5766e2 [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 Geissler7e0e3c02022-02-25 20:34:39 +00004LICENSE = "GPL-3.0-or-later"
Andrew Geissler82c905d2020-04-13 13:39:40 -05005LIC_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 \
Andrew Geissler82c905d2020-04-13 13:39:40 -050010 file://fix-doc-mandir.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050011 file://run-ptest \
Andrew Geissler82c905d2020-04-13 13:39:40 -050012 "
13
Andrew Geisslerd5838332022-05-27 11:33:10 -050014SRC_URI[sha256sum] = "4938dd5c1c125f6c78b1f4b3e297526f18ee74aa43d45c248578b1d2470c05a2"
Andrew Geissler82c905d2020-04-13 13:39:40 -050015
Andrew Geissler82c905d2020-04-13 13:39:40 -050016inherit autotools pkgconfig gettext texinfo ptest
17
Andrew Geisslerd1e89492021-02-12 15:35:20 -060018PACKAGECONFIG ?= "readline"
Andrew Geissler5f350902021-07-23 13:09:54 -040019PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper lvm2"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060020PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
21
Andrew Geissler5a43b432020-06-13 10:46:56 -050022BBCLASSEXTEND = "native nativesdk"
Andrew Geissler82c905d2020-04-13 13:39:40 -050023
24do_compile_ptest() {
25 oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags
26}
27
28do_install_ptest() {
29 t=${D}${PTEST_PATH}
30 mkdir $t/build-aux
31 cp ${S}/build-aux/test-driver $t/build-aux/
32 cp -r ${S}/tests $t
33 cp ${B}/tests/Makefile $t/tests/
Andrew Geissler5f350902021-07-23 13:09:54 -040034 mkdir $t/lib
35 cp ${B}/lib/config.h $t/lib
Andrew Geissler82c905d2020-04-13 13:39:40 -050036 sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile
37 sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile
38 sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile
Andrew Geissler5f350902021-07-23 13:09:54 -040039 sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" $t/tests/Makefile
40 sed -i "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" $t/tests/Makefile
Andrew Geissler82c905d2020-04-13 13:39:40 -050041 sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile
Andrew Geissler90fd73c2021-03-05 15:25:55 -060042 sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile
Andrew Geissler82c905d2020-04-13 13:39:40 -050043 for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \
44 do cp ${B}/tests/.libs/$i $t/tests/; \
45 done
46 sed -e 's| ../parted||' -i $t/tests/*.sh
47}
48
Patrick Williams213cb262021-08-07 19:21:33 -050049RDEPENDS:${PN}-ptest = "bash coreutils perl util-linux-losetup util-linux-mkswap python3 make gawk e2fsprogs-mke2fs e2fsprogs-tune2fs python3-core dosfstools"
50RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-loop kernel-module-vfat"
51RDEPENDS:${PN}-ptest:append:libc-glibc = "\
Andrew Geissler82c905d2020-04-13 13:39:40 -050052 glibc-utils \
53 locale-base-en-us \
54 "
55
56inherit update-alternatives
57
58ALTERNATIVE_PRIORITY = "100"
Patrick Williams213cb262021-08-07 19:21:33 -050059ALTERNATIVE:${PN} = "partprobe"
Andrew Geissler82c905d2020-04-13 13:39:40 -050060ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe"