pkgsrc/devel/libgetopt/Makefile

41 lines
1.1 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.18 2005/03/10 19:19:46 tv Exp $
#
DISTNAME= libgetopt-1.4
CATEGORIES= pkgtools sysutils
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= tech-pkg@NetBSD.org
COMMENT= Library for handling --long options
2000-10-22 00:03:22 +02:00
USE_LIBTOOL= YES
WRKSRC= ${WRKDIR}/libgetopt
.include "../../mk/bsd.prefs.mk"
.if exists(/usr/include/getopt.h) && empty(LOWER_OPSYS:Mirix5*)
PKG_SKIP_REASON= "${PKGNAME} is part of your ${OPSYS} distribution"
.endif
.if ${OPSYS} == "SunOS"
MAKEFLAGS+= NETBSD_COMPATIBLE=YES
CFLAGS+= -DREPLACE_GETOPT
.endif
do-extract:
${MKDIR} ${WRKSRC}
${CP} ${FILESDIR}/getopt_long.? ${WRKSRC}
${CP} ${FILESDIR}/getopt.h ${WRKSRC}
do-build:
cd ${WRKSRC} && ${LIBTOOL} --mode=compile ${COMPILE.c} getopt_long.c
cd ${WRKSRC} && ${LIBTOOL} --mode=link ${LINK.c} -o libgetopt.la getopt_long.lo -version-info 5:0:4 -rpath ${PREFIX}/lib
do-install:
${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libgetopt.la ${PREFIX}/lib/
${INSTALL_DATA} ${WRKSRC}/getopt.h ${PREFIX}/include/
${INSTALL_MAN} ${WRKSRC}/getopt_long.3 ${PREFIX}/man/man3/
.include "../../mk/bsd.pkg.mk"