# SliTaz package receipt.

PACKAGE="parted"
VERSION="3.0"
CATEGORY="system-tools"
SHORT_DESC="GNU parted partition editor."
MAINTAINER="pankso@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://www.gnu.org/software/parted/index.shtml"
WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="util-linux-ng-uuid util-linux-ng-blkid"
BUILD_DEPENDS="e2fsprogs-dev util-linux-ng-uuid-dev util-linux-ng-blkid-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	grep -qs 'define u8' libparted/arch/linux.c ||
	sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
		libparted/arch/linux.c
	./configure \
		--disable-debug \
		--disable-Werror \
		--without-readline \
		--disable-device-mapper \
		$CONFIGURE_ARGS &&
	make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib $fs/usr/share/locale
	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
	cp -a $_pkg/usr/sbin $fs/usr
}