# $MidnightBSD: mports/security/chroot_safe/Makefile,v 1.3 2009/12/28 17:33:50 laffer1 Exp $

PORTNAME=	chroot_safe
PORTVERSION=	1.4
PORTREVISION=	2
CATEGORIES=	security sysutils
MASTER_SITES=	SF/chrootsafe/${PORTNAME}/${PORTVERSION}
EXTRACT_SUFX=	.tgz

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	A tool to chroot softwares easily
LICENSE=	mit

GNU_CONFIGURE=	YES

MAN1=		chroot_safe.1
PLIST_FILES=	sbin/chroot_safe libexec/chroot_safe/chroot_safe.so
PLIST_DIRS=	libexec/chroot_safe

post-patch:
	@${REINPLACE_CMD} -e  's|CXX=g++|CXX?=c++|' \
		-e 's|-o chroot_safe.so|chroot_safe.cpp -o chroot_safe.so|' \
		${WRKSRC}/Makefile.in
	@${REINPLACE_CMD} 's|chroot(1)|chroot(8)|' ${WRKSRC}/chroot_safe.1.in
	@${REINPLACE_CMD} 's|putenv|unsetenv|' ${WRKSRC}/chroot_safe.cpp

.include <bsd.port.mk>
