summaryrefslogtreecommitdiff
path: root/sysutils/hw-probe/Makefile
blob: efa4f58d170e6b344cf85ed6648309bcab3335a8 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>

PORTNAME=	hw-probe
PORTVERSION=	1.6.1
CATEGORIES=	sysutils perl5

MAINTAINER=	danfe@FreeBSD.org
COMMENT=	Probe for hardware, check operability, and find drivers

LICENSE=	LGPL21+ BSD4CLAUSE
LICENSE_COMB=	dual

RUN_DEPENDS=	curl:ftp/curl \
		hwstat:sysutils/hwstat \
		lsblk:sysutils/lsblk \
		smartctl:sysutils/smartmontools

USE_GITHUB=	yes
GH_ACCOUNT=	linuxhw

USES=		perl5
USE_PERL5=	run
MAKE_ARGS=	prefix=${PREFIX}
NO_BUILD=	yes

OPTIONS_DEFINE=	DOCS

PLIST_FILES=	bin/${PORTNAME}
PORTDOCS=	NEWS.md README.md

.include <bsd.port.pre.mk>

.if ${ARCH} == i386 || ${ARCH} == amd64
RUN_DEPENDS+=	dmidecode:sysutils/dmidecode \
		lscpu:sysutils/lscpu
.endif

post-patch:
	@${REINPLACE_CMD} -e '/my @KNOWN_BSD/s/free/&bsd", "&/ ; \
		s/if(checkCmd("pkg")/& and $$Name eq "ghostbsd"/ ; \
		s/ps x | grep/pgrep -l/' ${WRKSRC}/${PORTNAME}.pl

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.post.mk>