aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/flashrom/Makefile
blob: 6112e3bcf278ab79c2d6b8f0c11110948d47fb11 (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
48
49
50
51
52
53
54
55
56
57
58
59
# Created by: Alexander Logvinov <ports@logvinov.com>
# $FreeBSD$

PORTNAME=   flashrom
PORTVERSION=    0.9.9
PORTREVISION=   1
CATEGORIES= sysutils
MASTER_SITES=   http://download.flashrom.org/releases/

MAINTAINER= nukama+maintainer@gmail.com
COMMENT=    Utility for reading, writing, verifying, and erasing flash ROM chips

LICENSE=    GPLv2

LIB_DEPENDS=    libpci.so:devel/libpci

OPTIONS_DEFINE=     BUSPIRATE DMIDECODE DOCS FTDI
OPTIONS_DEFAULT=    DMIDECODE FTDI

BUSPIRATE_DESC=     Enable buspirate support (broken)
DMIDECODE_DESC=     Use dmidecode to gather DMI information
FTDI_DESC=      Enable external FT2232SPI flasher support

USES=       gmake tar:bzip2
MAKE_ENV=   CONFIG_BUSPIRATE_SPI=no \
        WARNERROR=no

ONLY_FOR_ARCHS= amd64 i386

PORTDOCS=   *

DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= ChangeLog README

DOCSRCDIR2= ${WRKSRC}/Documentation
DOCSDIR2=   ${DOCSDIR}/Documentation
DOC_FILES2= *.txt

PLIST_FILES=    bin/${PORTNAME} \
        man/man8/${PORTNAME}.8.gz

BUSPIRATE_MAKE_ENV= CONFIG_BUSPIRATE_SPI=yes

DMIDECODE_RUN_DEPENDS+= dmidecode:sysutils/dmidecode

FTDI_LIB_DEPENDS=   libftdi1.so:devel/libftdi1
FTDI_USES=      pkgconfig

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/

    ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/

    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
    @${MKDIR} ${STAGEDIR}${DOCSDIR2}
    ${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}

.include <bsd.port.mk>