diff options
author | Oskari Rauta <oskari.rauta@gmail.com> | 2021-04-21 03:27:11 +0300 |
---|---|---|
committer | Polynomdivision <vincent@systemli.org> | 2021-06-14 14:17:14 +0200 |
commit | 5ad56ca3407973980109a42c66995cd31fe1f456 (patch) | |
tree | 7c8d067746f3cacaaf01d271b7b39dd834f1501c /utils/parted | |
parent | 02bc1fc929e285153dee318f858f6781bab49895 (diff) |
parted: add new package
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
Diffstat (limited to 'utils/parted')
-rw-r--r-- | utils/parted/Config.in | 14 | ||||
-rw-r--r-- | utils/parted/Makefile | 53 | ||||
-rw-r--r-- | utils/parted/test.sh | 10 |
3 files changed, 77 insertions, 0 deletions
diff --git a/utils/parted/Config.in b/utils/parted/Config.in new file mode 100644 index 000000000..2a90b6352 --- /dev/null +++ b/utils/parted/Config.in @@ -0,0 +1,14 @@ +menu "Configuration" + depends on PACKAGE_parted + +config PARTED_READLINE + bool "Use readline library" + depends on PACKAGE_parted + default y + +config PARTED_LVM2 + bool "Support LVM" + depends on PACKAGE_parted + default n + +endmenu diff --git a/utils/parted/Makefile b/utils/parted/Makefile new file mode 100644 index 000000000..f163ab73a --- /dev/null +++ b/utils/parted/Makefile @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0-only + +include $(TOPDIR)/rules.mk + +PKG_NAME:=parted +PKG_VERSION:=3.4 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/parted/ +PKG_HASH:=e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com> + +include $(INCLUDE_DIR)/package.mk + +define Package/parted + SECTION:=utils + CATEGORY:=Utilities + TITLE:=GNU Parted + SUBMENU:=Disc + DEPENDS:=+libblkid +libuuid +PARTED_READLINE:libreadline +CONFIG_PARTED_READLINE:libncurses +PARTED_LVM2:libdevmapper +endef + +define Package/parted/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. +endef + +define Package/parted/config + source "$(SOURCE)/Config.in" +endef + +ifneq ($(CONFIG_PARTED_READLINE),y) + CONFIGURE_ARGS += --without-readline +endif + +ifneq ($(CONFIG_PARTED_LVM2),y) + CONFIGURE_ARGS += --disable-device-mapper +endif + +define Package/parted/install + $(INSTALL_DIR) $(1)/usr/lib $(1)/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so** $(1)/usr/lib/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parted $(1)/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partprobe $(1)/sbin/ +endef + +$(eval $(call BuildPackage,parted)) diff --git a/utils/parted/test.sh b/utils/parted/test.sh new file mode 100644 index 000000000..7b0115884 --- /dev/null +++ b/utils/parted/test.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +case "$1" in + "partprobe") + test $(/sbin/partprobe --version | grep '^Copyright' | wc -l) -gt 0 + ;; + "parted") + test $(/sbin/parted --version | grep '^Copyright' | wc -l) -gt 0 + ;; +esac |