# Template file for 'kpartx'
pkgname=kpartx
version=0.5.0
revision=3
wrksrc=multipath-tools-${version}
build_wrksrc=$pkgname
build_style=gnu-makefile
make_install_args="libudevdir=/usr/lib/udev bindir=/usr/bin"
CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DLIBDM_API_COOKIE"
LDFLAGS="-ldevmapper"
makedepends="device-mapper-devel"
short_desc="Create device maps from partition tables"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="GPL-2"
homepage="http://christophe.varoqui.free.fr/"
distfiles="http://christophe.varoqui.free.fr/multipath-tools/multipath-tools-${version}.tar.bz2"
checksum=f13cf1eb84e94e83b2019e68f7965526903c13e94246db43965d181668a0a6f9

post_extract() {
	sed -i 's/daddr_t/uint32_t/g' kpartx/solaris.c
	sed -i 's,<sysmacros.h>,<sys/sysmacros.h>,g' kpartx/lopart.c
}
