blob: 19c2495024be54f90a6cd31767fe20888d2e5459 (
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
|
# New ports collection makefile for: google-earth
# Date created: Jun 13 2006
# Whom: Florent Thoumie <flz@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= google-earth
PORTVERSION= 4.0.1693
CATEGORIES= astro deskutils
MASTER_SITES= http://dl.google.com/earth/GE${PORTVERSION:C/\..*//g}/
DISTFILES= ${TARGET_DISTFILE}
EXTRACT_ONLY= # none
MAINTAINER= flz@FreeBSD.org
COMMENT= Explore, Search and Discover
BUILD_DEPENDS= unmakeself:${PORTSDIR}/archivers/unmakeself
RUN_DEPENDS= update-mime-database:${PORTSDIR}/misc/shared-mime-info
RESTRICTED= Not sure about redistribution rights
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\..*//g}/
USE_LINUX= yes
USE_GNOME= desktopfileutils
REAL_DISTFILE= GoogleEarthLinux.bin
TARGET_DISTFILE= GoogleEarthLinux-${PORTVERSION}.bin
FETCH_CMD= /usr/bin/fetch -ARm
FETCH_BEFORE_ARGS= -o ${TARGET_DISTFILE}
.include <bsd.port.pre.mk>
UNMAKESELF= ${LOCALBASE}/bin/unmakeself
.if ${X_WINDOW_SYSTEM:L} != xfree86-3
.if defined(WITH_NVIDIA_GL)
RUN_DEPENDS+= ${LINUXBASE}/usr/lib/libGL.so.1:${PORTSDIR}/x11/nvidia-driver
.else
RUN_DEPENDS+= ${LINUXBASE}/usr/X11R6/lib/libGL.so.1:${PORTSDIR}/graphics/linux_dri
.endif
.else
RUN_DEPENDS+= ${LINUXBASE}/lib/libGL.so.1:${PORTSDIR}/graphics/linux_glx
.endif
do-fetch:
@cd ${DISTDIR}; \
${FETCH_CMD} ${FETCH_BEFORE_ARGS} -1 ${MASTER_SITES:S|$|${REAL_DISTFILE}|g} ${FETCH_AFTER_ARGS}
do-build:
@${MKDIR} ${WRKSRC}
@${CP} ${DISTDIR}/${DISTFILES} ${WRKSRC}
@cd ${WRKSRC} && ${UNMAKESELF} ${DISTFILES} && ${RM} -f ${DISTFILES}
@cd ${WRKSRC} && ${TAR} xf googleearth-data.tar && ${RM} -f googleearth-data.tar
@cd ${WRKSRC} && ${TAR} xf googleearth-linux-x86.tar && ${RM} -f googleearth-linux-x86.tar
@${REINPLACE_CMD} -i "" -e 's|^# Set the home.*|GOOGLEEARTH_DATA_PATH=${DATADIR}|' ${WRKSRC}/bin/googleearth
@${REINPLACE_CMD} -i "" -e "s|^# Let's boogie.*|rm -f \$${HOME}/.googleearth/instance-running-lock|" ${WRKSRC}/bin/googleearth
@${REINPLACE_CMD} -i "" -e 's/^TMPPATH.*/exit 0/' ${WRKSRC}/postinstall.sh
@${REINPLACE_CMD} -i "" -e 's|\"\$$SETUP_INSTALLPATH/|\"${WRKSRC}/|' ${WRKSRC}/postinstall.sh
@${REINPLACE_CMD} -i "" -e 's|\$$SETUP_INSTALLPATH/googleearth |${PREFIX}/bin/googleearth |' ${WRKSRC}/postinstall.sh
@${SETENV} SETUP_INSTALLPATH=${DATADIR} ${WRKSRC}/postinstall.sh
@cd ${WRKSRC} && ${RM} -rf setup.* preuninstall.sh postinstall.sh
@${CHOWN} -R ${SHAREDOWN}:${SHAREDGRP} ${WRKSRC}
do-install:
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/googleearth-mimetypes.xml ${PREFIX}/share/mime/packages/
${INSTALL_DATA} ${WRKSRC}/googleearth.desktop ${PREFIX}/share/applications/
${CP} -r ${WRKSRC}/* ${DATADIR}
@${RM} -f ${DATADIR}/googleearth-mimetypes.xml
@${RM} -f ${DATADIR}/googleearth.desktop
${LN} -sf ${DATADIR}/bin/googleearth ${PREFIX}/bin/
-@update-mime-database ${PREFIX}/share/mime
-@update-desktop-database
.include <bsd.port.post.mk>
|