aboutsummaryrefslogtreecommitdiffstats
path: root/astro/gpsman/Makefile
blob: 0083d7c4ee1e163ba0c533cbf7fb0864b8ad58d8 (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
# New ports collection makefile for:    gpsman
# Date created:     26 November 2001
# Whom:         David Wolfskill
#
# $FreeBSD$
#

PORTNAME=   gpsman
PORTVERSION=    6.4
CATEGORIES= astro tk geography
MASTER_SITES=   http://www.ncc.up.pt/gpsman/gpsmanhtml/
MASTER_SITE_SUBDIR= science/cartography
EXTRACT_SUFX=   .tgz

MAINTAINER= david@catwhisker.org
COMMENT=    A Tcl/Tk-based GPS management utility

#RUN_DEPENDS=   wish8.4:${PORTSDIR}/x11-toolkits/tk84
USE_TK_RUN= 84

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}
NO_BUILD=   yes

# MAN1=     gpsman.1
# MANCOMPRESSED=    yes

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 600000
GPSMAN_DEFAULT_PORT?=   /dev/cuaa0
.elif ${OSVERSION} < 800045
GPSMAN_DEFAULT_PORT?=   /dev/cuad0
.else
GPSMAN_DEFAULT_PORT?=   /dev/cuau0
.endif

post-patch:
    @(cd ${WRKSRC} && ${REINPLACE_CMD} "s|/dev/ttyS0|${GPSMAN_DEFAULT_PORT}|" \
        util/exerciser.tcl manual/html/info/l_realtime.doc.txt gpsman.tcl)

pre-install:
    @${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:g" ${WRKSRC}/gpsman.tcl

do-install:
    @${MKDIR} ${PREFIX}/share/gpsman
    @${MKDIR} ${PREFIX}/share/gpsman/gmsrc
    ${INSTALL_DATA} ${WRKSRC}/gmsrc/*.tcl ${PREFIX}/share/gpsman/gmsrc
    @${MKDIR} ${PREFIX}/share/gpsman/gmsrc/gmicons
    ${INSTALL_DATA} ${WRKSRC}/gmsrc/gmicons/* ${PREFIX}/share/gpsman/gmsrc/gmicons
    @${MKDIR} ${PREFIX}/share/gpsman/util
    ${INSTALL_DATA} ${WRKSRC}/util/*.sh ${PREFIX}/share/gpsman/util
    ${INSTALL_DATA} ${WRKSRC}/util/*.tcl ${PREFIX}/share/gpsman/util
    ${INSTALL_SCRIPT} ${WRKSRC}/gpsman.tcl ${PREFIX}/share/gpsman
    ${LN} -fs ${PREFIX}/share/gpsman/gpsman.tcl ${PREFIX}/bin/gpsman
#   ${INSTALL_MAN} ${WRKSRC}/gpsman.1 ${PREFIX}/man/man1
.if !defined(NOPORTDOCS)
    @${MKDIR} ${PREFIX}/share/doc/gpsman
    ${INSTALL_DATA} ${WRKSRC}/manual/*.pdf ${PREFIX}/share/doc/gpsman
    @${MKDIR} ${PREFIX}/share/doc/gpsman/html
    ${INSTALL_DATA} ${WRKSRC}/manual/html/*.html ${PREFIX}/share/doc/gpsman/html
    ${RM} ${PREFIX}/share/doc/gpsman/html/index.html
    ${LN} ${PREFIX}/share/doc/gpsman/html/GPSMandoc.html ${PREFIX}/share/doc/gpsman/html/index.html
    ${INSTALL_DATA} ${WRKSRC}/manual/html/*.gif ${PREFIX}/share/doc/gpsman/html
    @${MKDIR} ${PREFIX}/share/doc/gpsman/html/info
    ${INSTALL_DATA} ${WRKSRC}/manual/html/info/*.gif ${PREFIX}/share/doc/gpsman/html/info
    ${INSTALL_DATA} ${WRKSRC}/manual/html/info/*.txt ${PREFIX}/share/doc/gpsman/html/info
    ${RM} ${PREFIX}/share/doc/gpsman/html/info/GPL.txt
    ${INSTALL_DATA} ${WRKSRC}/manual/html/info/*.ps ${PREFIX}/share/doc/gpsman/html/info
    @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" pkg-message
.endif

.include <bsd.port.post.mk>