summaryrefslogtreecommitdiff
path: root/sysutils/ups-nut-usb/Makefile
blob: 816c5b0b7a9714649c8d0bb04463bf0a68c212bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# $NetBSD: Makefile,v 1.6 2018/02/10 13:53:48 khorben Exp $

.include "../../sysutils/ups-nut/Makefile.common"

PKGNAME=		${DISTNAME:S/nut/ups-nut-usb/}
PKGREVISION=		1
COMMENT=		Network UPS Tools USB drivers

DEPENDS+=		ups-nut-2.*:../../sysutils/ups-nut

INSTALLATION_DIRS+=	${PREFIX}/libexec/nut
INSTALLATION_DIRS+=	${PREFIX}/${PKGMANDIR}/man8

BUILD_DEFS+=		NUT_STATEDIR

CONFIGURE_ARGS+=	--with-usb --with-drvpath=${NUT_DRVDIR:Q}

do-install:
	for f in usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb;\
	 do \
		${INSTALL_PROGRAM} ${WRKSRC}/drivers/$$f \
		    ${DESTDIR}${PREFIX}/libexec/nut/; \
	done
	for f in usbhid-ups.8 bcmxcp_usb.8 tripplite_usb.8 richcomm_usb.8; do \
		${INSTALL_MAN} ${WRKSRC}/docs/man/$$f \
		    ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/; \
	done

.include "../../mk/libusb.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"