blob: 8924bdb478c8ff3f97a3bd43ea77c86f56b6c06f [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 \
Andrew Geissler82c905d2020-04-13 13:39:40 -050010 file://fix-doc-mandir.patch \
11 file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050012 file://run-ptest \
Andrew Geissler5f350902021-07-23 13:09:54 -040013 file://check-vfat.patch \
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
Andrew Geissler82c905d2020-04-13 13:39:40 -050019inherit autotools pkgconfig gettext texinfo ptest
20
Andrew Geisslerd1e89492021-02-12 15:35:20 -060021PACKAGECONFIG ?= "readline"
Andrew Geissler5f350902021-07-23 13:09:54 -040022PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper lvm2"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060023PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
24
Andrew Geissler5a43b432020-06-13 10:46:56 -050025BBCLASSEXTEND = "native nativesdk"
Andrew Geissler82c905d2020-04-13 13:39:40 -050026
27do_compile_ptest() {
28 oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags
29}
30
31do_install_ptest() {
32 t=${D}${PTEST_PATH}
33 mkdir $t/build-aux
34 cp ${S}/build-aux/test-driver $t/build-aux/
35 cp -r ${S}/tests $t
36 cp ${B}/tests/Makefile $t/tests/
Andrew Geissler5f350902021-07-23 13:09:54 -040037 mkdir $t/lib
38 cp ${B}/lib/config.h $t/lib
Andrew Geissler82c905d2020-04-13 13:39:40 -050039 sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile
40 sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile
41 sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile
Andrew Geissler5f350902021-07-23 13:09:54 -040042 sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" $t/tests/Makefile
43 sed -i "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" $t/tests/Makefile
Andrew Geissler82c905d2020-04-13 13:39:40 -050044 sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile
Andrew Geissler90fd73c2021-03-05 15:25:55 -060045 sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile
Andrew Geissler82c905d2020-04-13 13:39:40 -050046 for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \
47 do cp ${B}/tests/.libs/$i $t/tests/; \
48 done
49 sed -e 's| ../parted||' -i $t/tests/*.sh
50}
51
Patrick Williams213cb262021-08-07 19:21:33 -050052RDEPENDS:${PN}-ptest = "bash coreutils perl util-linux-losetup util-linux-mkswap python3 make gawk e2fsprogs-mke2fs e2fsprogs-tune2fs python3-core dosfstools"
53RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-loop kernel-module-vfat"
54RDEPENDS:${PN}-ptest:append:libc-glibc = "\
Andrew Geissler82c905d2020-04-13 13:39:40 -050055 glibc-utils \
56 locale-base-en-us \
57 "
58
59inherit update-alternatives
60
61ALTERNATIVE_PRIORITY = "100"
Patrick Williams213cb262021-08-07 19:21:33 -050062ALTERNATIVE:${PN} = "partprobe"
Andrew Geissler82c905d2020-04-13 13:39:40 -050063ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe"