2012-10-22 20:13:36 +00:00
|
|
|
# Created by: Kai Wang <kaiwang27@gmail.com>
|
2009-09-19 20:20:28 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= uhidd
|
2012-10-22 20:13:36 +00:00
|
|
|
PORTVERSION= 0.2.1
|
2012-10-29 12:41:01 +00:00
|
|
|
PORTREVISION= 1
|
2009-09-19 20:20:28 +00:00
|
|
|
CATEGORIES= sysutils
|
2010-03-15 15:49:15 +00:00
|
|
|
MASTER_SITES= GOOGLE_CODE \
|
|
|
|
http://people.freebsd.org/~kaiw/distfiles/
|
2009-09-19 20:20:28 +00:00
|
|
|
|
2014-07-06 15:52:25 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2009-09-19 20:20:28 +00:00
|
|
|
COMMENT= Userland USB HID device driver using libusb20
|
|
|
|
|
2014-01-17 17:04:18 +00:00
|
|
|
LICENSE= BSD2CLAUSE
|
|
|
|
|
2012-10-22 20:13:36 +00:00
|
|
|
BUILD_DEPENDS= cuse4bsd-kmod>=0.1.24:${PORTSDIR}/multimedia/cuse4bsd-kmod
|
2014-01-17 17:04:18 +00:00
|
|
|
LIB_DEPENDS= libcuse4bsd.so:${PORTSDIR}/multimedia/cuse4bsd-kmod
|
2009-09-19 20:20:28 +00:00
|
|
|
|
|
|
|
USE_RC_SUBR= uhidd
|
2010-08-26 14:50:38 +00:00
|
|
|
SUB_FILES= pkg-message
|
2009-09-19 20:20:28 +00:00
|
|
|
|
2012-10-22 20:13:36 +00:00
|
|
|
LIBDIR= ${PREFIX}/lib
|
|
|
|
|
2014-08-03 10:37:12 +00:00
|
|
|
OPTIONS_DEFINE= DEVD
|
|
|
|
OPTIONS_DEFAULT= DEVD
|
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
2009-09-19 20:20:28 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-10-22 20:13:36 +00:00
|
|
|
LIBCUSE= ${LIBDIR}/libcuse4bsd.so
|
|
|
|
|
2010-08-26 14:50:38 +00:00
|
|
|
.if defined(DEBUG_FLAGS)
|
|
|
|
MAKE_ENV+= DEBUG_FLAGS='${DEBUG_FLAGS}'
|
|
|
|
.endif
|
|
|
|
|
2009-09-19 20:20:28 +00:00
|
|
|
.if ${OSVERSION} < 800069
|
2009-11-12 03:36:06 +00:00
|
|
|
IGNORE= does not build with the old USB stack
|
2012-05-27 09:14:07 +00:00
|
|
|
.elif ${OSVERSION} > 1000012
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-uhidd-parser.y
|
2009-09-19 20:20:28 +00:00
|
|
|
.endif
|
|
|
|
|
2010-08-26 14:50:38 +00:00
|
|
|
post-patch: .SILENT
|
2012-10-22 20:13:36 +00:00
|
|
|
${FIND} ${WRKSRC}/uhidd -type f -not -name Makefile \
|
|
|
|
-exec ${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' {} +
|
2009-09-19 20:20:28 +00:00
|
|
|
|
|
|
|
do-install:
|
2014-08-03 10:37:12 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/uhidd/uhidd ${STAGEDIR}${PREFIX}/sbin
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/uhidd/uhidd.8 ${STAGEDIR}${PREFIX}/man/man8
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/uhidd/uhidd.conf.5 ${STAGEDIR}${PREFIX}/man/man5
|
2012-10-22 20:13:36 +00:00
|
|
|
.if ${PORT_OPTIONS:MDEVD}
|
2014-08-03 10:37:12 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/devd
|
2012-10-22 20:13:36 +00:00
|
|
|
${REINPLACE_CMD} -E \
|
|
|
|
-e "s|%%PREFIX%%|${PREFIX}|" \
|
|
|
|
-e "s|%%LIBCUSE%%|${LIBCUSE}|" \
|
|
|
|
${WRKSRC}/uhidd/uhidd-devd.conf.sample
|
2014-08-03 10:37:12 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/uhidd/uhidd-devd.conf.sample \
|
|
|
|
${STAGEDIR}${PREFIX}/etc/devd
|
2009-09-19 20:20:28 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|