aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/mcelog/Makefile
blob: 70bfee9b8d686293f35bb21a0e6208eda046e1c7 (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
# Created by: Jeremy Chadwick <freebsd@jdc.parodius.com>
# $FreeBSD$

PORTNAME=   mcelog
PORTVERSION=    153
DISTVERSIONPREFIX=  v
CATEGORIES= sysutils

MAINTAINER= ultima1252@gmail.com
COMMENT=    Collects and decodes Machine Check Exception data

LICENSE=    GPLv2

TEST_DEPENDS=   bash:shells/bash

USE_GITHUB= yes
GH_ACCOUNT= andikleen

ONLY_FOR_ARCHS=     amd64 i386

USES=       alias gmake shebangfix

SHEBANG_FILES=  tests/cache/inject tests/memdb/inject tests/page/inject \
        tests/pfa/inject tests/server/inject tests/socket/inject \
        tests/trigger tests/unknown/inject

MAKE_ENV+=  FREEBSD=1
MAKE_ARGS+= CFLAGS="${CFLAGS}" prefix="${PREFIX}"
LDFLAGS+=   -lkvm

PLIST_FILES=    bin/mcelog man/man8/mcelog.8.gz

post-patch:
    @${ECHO} "${DISTVERSIONPREFIX}${PORTVERSION}" >${WRKSRC}/.os_version
    @${CP} ${FILESDIR}/memstream.c ${WRKSRC}/memstream.c
    @${REINPLACE_CMD} 's/\"unknown\"/\"${PORTVERSION}\"/' \
        ${WRKSRC}/Makefile

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/mcelog ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/mcelog.8 ${STAGEDIR}${MANPREFIX}/man/man8

.include <bsd.port.mk>