freebsd-ports/security/openct/Makefile
Mathieu Arnold 4a3bebcae1 Add EXAMPLES options to ports that should have one.
Also various fixes related to said option.

PR:		230864
Submitted by:	mat
exp-runs by:	antoine
2018-09-10 13:15:47 +00:00

59 lines
1.3 KiB
Makefile

# Created by: Janos Mohacsi <janos.mohacsi@bsd.hu>
# $FreeBSD$
PORTNAME= openct
PORTVERSION= 0.6.20
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= SF/opensc/${PORTNAME}
MAINTAINER= ale@FreeBSD.org
COMMENT= Middleware framework for smart card terminals
LICENSE= LGPL21
LIB_DEPENDS= libltdl.so:devel/libltdl
OPTIONS_DEFINE= PCSC DOCS EXAMPLES
PCSC_DESC= Enable PC/SC support
GNU_CONFIGURE= yes
USES= gmake libtool pkgconfig
USE_LDCONFIG= yes
USE_RC_SUBR= openct
SUB_FILES= etoken.conf
CONFIGURE_ENV= LTLIB_CFLAGS="-I${LOCALBASE}/include" \
LTLIB_LIBS="-L${LOCALBASE}/lib -lltdl"
CONFIGURE_ARGS= --localstatedir=/var --enable-usb
PORTDOCS= *
PORTEXAMPLES= *
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPCSC}
LIB_DEPENDS+= libpcsclite.so:devel/pcsc-lite
CONFIGURE_ARGS+=--enable-pcsc
PLIST_SUB+= PCSC=""
.else
PLIST_SUB+= PCSC="@comment "
.endif
.if ${PORT_OPTIONS:MDOCS}
CONFIGURE_ARGS+=--enable-doc
.endif
post-patch:
@${REINPLACE_CMD} -e '/PKG_CONFIG/s/libusb/&-0.1/' \
-e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
${WRKSRC}/configure
@${REINPLACE_CMD} 's|install-data-am: install-dist_apidocDATA install-dist_docDATA|install-data-am: install-dist_docDATA|' \
${WRKSRC}/doc/Makefile.in
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/etoken.conf ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>