aboutsummaryrefslogtreecommitdiff
path: root/astro/roadmap/Makefile
blob: 5f2b6cb9fcca85bc07cd97b885e6e876a64997b3 (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
# New ports collection makefile for:	RoadMap
# Date created:				4 November 2002
# Whom:					Nick Esborn <nick@netdot.net>
#
# $FreeBSD$
#

PORTNAME=	roadmap
PORTVERSION=	1.2.1
PORTREVISION=	2
CATEGORIES=	astro geography
MASTER_SITES=	SF/${PORTNAME}/RoadMap/${PORTVERSION}
DISTNAME=	${PORTNAME}-${PORTVERSION}-src

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Vector-based GPS moving map

LIB_DEPENDS=	expat.6:${PORTSDIR}/textproc/expat2

WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
BUILD_WRKSRC=	${WRKSRC}/src
INSTALL_WRKSRC=	${WRKSRC}/src

USE_GNOME=	gtk20
USE_GMAKE=	yes
MAKE_ARGS=	INSTALLDIR="${PREFIX}" CC="${CC}" CXX="${CXX}"

SUB_FILES=	pkg-message

MAN1=		roadgps.1 roadmap.1
PORTDOCS=	${DOCS} README
PLIST_FILES=	${BINS:S,^,bin/,} ${GUI_BINS:S,^,bin/,} \
		${GUI_BINS:S,^gtk,bin/,} ${SCRIPTS:S,^,bin/,} \
		${DATA:S,^,%%DATADIR%%/,}
PLIST_DIRS=	%%DATADIR%%

BINS=		dumpmap buildmap buildmap_osm buildplace buildus
GUI_BINS=	gtkroadmap gtkroadgps
SCRIPTS=	rdmcompare rdmdownload rdmgendcwmaps rdmgenmaps \
		rdmgenshpmaps rdmgenstatemaps
DATA=		drivers preferences roadmap.popup roadmap.screenobjects \
		session sprites
DOCS=		Bugs ChangeLog Coding Configuration Developer-Guide \
		Installation Map-Building Map-Designing Map-Format \
		OpenStreetMap Platforms Quickstart Status ToDo Usage

post-patch:
	@${REINPLACE_CMD} -e 's|-O ||g ; \
		 s|/usr/include|${LOCALBASE}/include|g ; \
		 s|/usr/local/include|${LOCALBASE}/include|g ; \
		 s|/usr/local/lib|${LOCALBASE}/lib|g' ${WRKSRC}/src/options.mk

do-install:
.for _BIN in ${BINS}
	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${_BIN} ${PREFIX}/bin/${_BIN}
.endfor
.for _GUI_BIN in ${GUI_BINS}
	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/gtk2/${_GUI_BIN} ${PREFIX}/bin/${_GUI_BIN}
	${LN} -sf ${_GUI_BIN} ${PREFIX}/bin/${_GUI_BIN:S,^gtk,,}
.endfor
.for _SCRIPT in ${SCRIPTS}
	${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/${_SCRIPT} ${PREFIX}/bin/${_SCRIPT}
.endfor
.for _MAN in ${MAN1}
	${INSTALL_MAN} ${INSTALL_WRKSRC}/${_MAN} ${MANPREFIX}/man/man1/${_MAN}
.endfor
	@${MKDIR} ${DATADIR}
.for _DATA in ${DATA}
	${INSTALL_DATA} ${INSTALL_WRKSRC}/${_DATA} ${DATADIR}/${_DATA}
.endfor
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README
.for _DOC in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/doc/${_DOC} ${DOCSDIR}/${_DOC}
.endfor
.endif

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>