aboutsummaryrefslogtreecommitdiffstats
path: root/net/bnxt-kmod/Makefile
blob: a0dd0108c266fb389142ea9df06249a1e699a1ed (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
# $FreeBSD$

PORTNAME=   bnxt-kmod
PORTVERSION=    309078
CATEGORIES= net
MASTER_SITES=   LOCAL/shurd

MAINTAINER= shurd@FreeBSD.org
COMMENT=    Driver for Broadcom NetXtreme-C/NetXtreme-E devices

LICENSE=    BSD2CLAUSE

USES=       kmod
BUILD_WRKSRC=   ${WRKSRC}/sys/modules/bnxt

PLIST_FILES=    ${KMODDIR}/if_bnxt.ko \
        man/man4/bnxt.4.gz \
        man/man4/if_bnxt.4.gz

create-tarball:
    ${MKDIR} ${WRKDIR}
    svnlite checkout -r ${PORTVERSION} --depth empty https://svn.freebsd.org/base/head ${WRKSRC}
    svnlite update -r ${PORTVERSION} --set-depth empty ${WRKSRC}/sys
    svnlite update -r ${PORTVERSION} --set-depth empty ${WRKSRC}/sys/dev
    svnlite update -r ${PORTVERSION} --set-depth infinity ${WRKSRC}/sys/dev/bnxt
    svnlite update -r ${PORTVERSION} --set-depth empty ${WRKSRC}/sys/modules
    svnlite update -r ${PORTVERSION} --set-depth infinity ${WRKSRC}/sys/modules/bnxt
    svnlite update -r ${PORTVERSION} --set-depth empty ${WRKSRC}/share
    svnlite update -r ${PORTVERSION} --set-depth empty ${WRKSRC}/share/man
    svnlite update -r ${PORTVERSION} --set-depth empty ${WRKSRC}/share/man/man4
    svnlite update -r ${PORTVERSION} ${WRKSRC}/share/man/man4/bnxt.4
    tar czf ${DISTNAME}${EXTRACT_SUFX} -C ${WRKDIR} --exclude=.svn ${DISTNAME}
    scp ${DISTNAME}${EXTRACT_SUFX} freefall:public_distfiles/

post-patch:
    @${REINPLACE_CMD} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${WRKSRC}/sys/dev/bnxt/if_bnxt.c

do-install:
    ${INSTALL_KLD} ${WRKSRC}/sys/modules/bnxt/if_bnxt.ko ${STAGEDIR}${KMODDIR}/if_bnxt.ko
    ${INSTALL_MAN} ${WRKSRC}/share/man/man4/bnxt.4 ${STAGEDIR}${MAN4PREFIX}/man/man4/
    ${LN} -f ${STAGEDIR}${MAN4PREFIX}/man/man4/bnxt.4 ${STAGEDIR}${MAN4PREFIX}/man/man4/if_bnxt.4

.include <bsd.port.pre.mk>

SUPPORTED=  no
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200002 && ${OSVERSION} <= 1200014
SUPPORTED=  yes
.endif
.if ${SUPPORTED} == no
IGNORE=     not supported on this version of FreeBSD
.endif

.include <bsd.port.post.mk>