#
# Copyright (C) 2012 OpenWrt.org
# Copyright (C) 2014 HBM Netherlands B.V.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk

PKG_NAME:=parted
PKG_VERSION:=3.1
PKG_RELEASE:=1

PKG_SOURCE:=parted-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/parted
#PKG_MD5SUM:=76a6457ea88447d79d50ca331069b19c
PKG_MD5SUM:=5d89d64d94bcfefa9ce8f59f4b81bdcb

include $(INCLUDE_DIR)/package.mk

define Package/parted
	SECTION:=utils
	CATEGORY:=Utilities
	SUBMENU:=disc
	TITLE:=GNU Parted manipulates partition tables
	URL:=http://www.gnu.org/software/parted/
	DEPENDS:= +libuuid +libreadline +libncurses
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. The package contains a library, 
	libparted, as well as well as a command-line frontend, parted, 
	which can also be used in scripts.
endef

define Package/parted/config
	source "$(SOURCE)/Config.in"
endef

CONFIGURE_ARGS += --enable-static --disable-shared --disable-device-mapper

define Package/parted/install
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)/parted $(1)/usr/sbin
endef

$(eval $(call BuildPackage,parted))

