aboutsummaryrefslogtreecommitdiffstats
path: root/misc/heyu2/Makefile
blob: 142be7ecc9dc70aeddfe0bed8b8ce5242d12b4f3 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Created by: mstowe@chicago.us.mensa.org
# $FreeBSD$

PORTNAME=   heyu2
PORTVERSION=    2.10
CATEGORIES= misc
MASTER_SITES=   http://www.heyu.org/download/
DISTNAME=   heyu-${PORTVERSION}

MAINTAINER= mstowe@chicago.us.mensa.org
COMMENT=    Control a CM11A interface from the command line

CONFLICTS=  heyu-[0-9]*

#IS_INTERACTIVE=    yes
ALL_TARGET= all
HAS_CONFIGURE=  yes
CONFIGURE_SCRIPT=   Configure
CONFIGURE_ARGS= freebsd

MAN1=       heyu.1
MAN5=       x10aux.5 \
        x10config.5 \
        x10cm17a.5 \
        x10digimax.5 \
        x10oregon.5 \
        x10sched.5 \
        x10scripts.5 \
        x10rfxmeters.5 \
        x10rfxsensors.5

OPTIONS_DEFINE= CM17A EXTENDED RFXSENS RFXMETER DMX OREGON
CM17A_DESC= X10 CM17A "Firecracker" Support
EXTENDED_DESC=  Extended Type 0 (Shutter/Shade) Support
RFXSENS_DESC=   RFXSensors (RF) Support
RFXMETER_DESC=  RFXMeter (RF) Support
DMX_DESC=   Digimax Thermostat Support
OREGON_DESC=    Oregon Support

OPTIONS_DEFAULT=    CM17A EXTENDED RFXSENS RFXMETER DMX OREGON

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ! ${PORT_OPTIONS:MCM17A}
CONFIGURE_ARGS+=    nocm17a
.endif

.if ! ${PORT_OPTIONS:MEXTENDED}
CONFIGURE_ARGS+=    noext0
.endif

.if ! ${PORT_OPTIONS:MRFXSENS}
CONFIGURE_ARGS+=    norfxs
.endif

.if ! ${PORT_OPTIONS:MRFXMETER}
CONFIGURE_ARGS+=    norfxm
.endif

.if ! ${PORT_OPTIONS:MDMX}
CONFIGURE_ARGS+=    nodmx
.endif

.if ! ${PORT_OPTIONS:MOREGON}
CONFIGURE_ARGS+=    noore
.endif

post-patch:
    @${REINPLACE_CMD} -E 's|/usr/local|${PREFIX}|g; \
                 s,(CC) =,\1 ?=,g; \
                 s,(CFLAGS) =,\1 +=,g' \
        ${WRKSRC}/Configure
    @${REINPLACE_CMD} -e 's|<.*termio[s]*.h|<sys/ttycom.h|g' \
        ${WRKSRC}/cm17a.c \
        ${WRKSRC}/xsync.c \
        ${WRKSRC}/xwrite.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/heyu ${PREFIX}/bin
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_MAN} ${WRKSRC}/heyu.1 ${MAN1PREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/x10aux.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10config.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10cm17a.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10digimax.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10oregon.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10sched.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10scripts.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10rfxmeters.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_MAN} ${WRKSRC}/x10rfxsensors.5 ${MAN5PREFIX}/man/man5
    ${INSTALL_DATA} ${WRKSRC}/x10config.sample ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/x10.sched.sample ${EXAMPLESDIR}

.include <bsd.port.mk>