aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/ptx-kmod/Makefile
blob: b7d8882afc4bd5dc043ef8e259b74839400d882c (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
# New ports collection makefile for:    ptx-kmod
# Date created:     July 2 2011
# Whom:         hrs
#
# $FreeBSD$
#

PORTNAME=   ptx
PORTVERSION=    0.0.20111212
CATEGORIES= multimedia
MASTER_SITES=   ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= hrs
PKGNAMESUFFIX=  -kmod
DISTNAME=   ${PORTNAME}-${PORTVERSION:S,0.0.,,}

MAINTAINER= hrs@FreeBSD.org
COMMENT=    Device driver for PT1/PT2 ISDB-S/T tuner cards

LICENSE=    GPLv3
ONLY_FOR_ARCHS= amd64 i386
BUILD_WRKSRC=   ${WRKSRC}/dev/ptx
MAKE_ENV=   KMODDIR=${PREFIX}/${KMODDIR} SYSDIR=${SYSDIR}
PLIST_FILES=    ${KMODDIR}/ptx.ko bin/recptx.pl
PLIST_DIRS= ${KMODDIR}
SUB_LIST=   KMODDIR=${KMODDIR}
USE_RC_SUBR=    ptx.sh
PORTDOCS=   README

KMODDIR=    libexec/${PORTNAME}
SYSDIR?=    ${SRC_BASE}/sys

.include <bsd.port.pre.mk>
KERNCONF?=  GENERIC

# Use the first component of ${KERNCONF}.
.for K in ${KERNCONF}
_KERNCONF?=$K
.endfor

.if !exists(${SRC_BASE}/sys/${ARCH}/conf/${_KERNCONF})
IGNORE=     requires kernel source to be installed
.endif

do-install:
    @${MKDIR} ${PREFIX}/${KMODDIR}
    ${INSTALL_KLD} ${BUILD_WRKSRC}/ptx.ko ${PREFIX}/${KMODDIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/tools/recptx.pl ${PREFIX}/bin
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif

.include <bsd.port.post.mk>