freebsd-ports/emulators/linux-vmware-toolbox2/Makefile
Boris Samorodov 0263b9d868 Welcome to the new linux ports infrastructure which allows using
both current (fc4) and future linux (f8) distributions at one
ports tree.

The patch contains full changes to ports/Mk files and all ports involved.
But only infrastructure is changed. The resulting packages are the same as
before. Hence no need to bump PORTREVISIONs.

The idea was taken from bsd.gnome.mk and others.

More than 130 ports are switched to follow a new linux infrastructure
introduced by changes to bsd.port.mk, bsd.linux-rpm.mk and a new
bsd.linux-apps.mk.

Thanks for all who was involved and helped me with this work.
And help from Alexander Leidinger was incredible.

Other changes are coming. Stay tuned!

PR:		ports/132510
Submitted by:	bsam (me)
Exp-run by:	portmgr (pav)
2009-03-19 17:28:51 +00:00

96 lines
2.3 KiB
Makefile

# New ports collection makefile for: VMware toolbox for Linux
# Date created: 10 Aug 2000
# Whom: matusita@jp.FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= vmware-toolbox
PORTVERSION= ${VMWARE_VER}.${BUILD_VER}
PORTREVISION= 1
CATEGORIES= emulators linux
MASTER_SITES= # bundled with VMware itself
PKGNAMEPREFIX= linux-
DISTNAME= vmware-linux-tools
MAINTAINER= matusita@FreeBSD.org
COMMENT=VMware toolbox for guest OS (for VMware 2.x, Linux version)
ONLY_FOR_ARCHS= i386
PLIST_FILES= bin/linux-vmware-toolbox
USE_LINUX= yes
USE_LINUX_APPS= xorglibs
NO_BUILD= yes
.if !defined(BATCH)
IS_INTERACTIVE= yes
.endif
RESTRICTED= "Not sure if we can redistribute this."
NO_PACKAGE= ${RESTRICTED}
NO_LATEST_LINK= yes
.include <bsd.port.pre.mk>
LINUX_FLP?= ${DISTDIR}/linux.flp
MOUNT_PT?= ${WRKDIR}/mnt
.if exists(${LINUX_FLP})
DEV_ATTACH= /usr/sbin/mdconfig -a -t vnode -f ${LINUX_FLP} -u ${MOUNT_DEV}
DEV_DETACH= /usr/sbin/mdconfig -d -u ${MOUNT_DEV}
MOUNT_DEV?= md0
.else
MOUNT_DEV?= fd0
.endif
VMWARE_VER= 2.0.4
BUILD_VER= 1142
MOUNT= /sbin/mount
UMOUNT= /sbin/umount
pre-fetch:
.if !exists("${DISTDIR}/${DISTFILES}")
@${ECHO} "========================================================================"
@${ECHO} ""
@${ECHO} "To install this port, please:"
@${ECHO} ""
@${ECHO} " Select the menu item \"Devices -> floppy0 -> Edit\" on VMware,"
@${ECHO} " and choose the file \"linux.flp\"."
@${ECHO} ""
@${ECHO} "========================================================================"
@${ECHO} ""
@${ECHO} -n "Are ready to install this ports? [Y/n]: "
.if !defined(BATCH)
@(read line; \
case "$${line}" in \
[Nn]*) \
${FALSE} ;; \
*) \
${TRUE} ;; \
esac)
.endif
.endif
do-fetch:
.if exists("${DISTDIR}/${DISTFILES}")
@${ECHO} "Found ${DISTDIR}/${DISTFILES}."
.else
${MKDIR} ${MOUNT_PT}
-${UMOUNT} ${MOUNT_PT} 2>&1 >/dev/null
-${UMOUNT} /dev/${MOUNT_DEV} 2>&1 >/dev/null
.if exists(${LINUX_FLP})
-${DEV_DETACH} 2>&1 >/dev/null
${DEV_ATTACH}
.endif
${MOUNT} -t msdos -r /dev/${MOUNT_DEV} ${MOUNT_PT}
${CP} ${MOUNT_PT}/${DISTFILES} ${DISTDIR}
${UMOUNT} /dev/${MOUNT_DEV}
.if exists(${LINUX_FLP})
${DEV_DETACH}
.endif
.endif
do-install:
${BRANDELF} -t Linux ${WRKSRC}/vmware-toolbox
${INSTALL_PROGRAM} ${WRKSRC}/vmware-toolbox ${PREFIX}/bin/linux-vmware-toolbox
.include <bsd.port.post.mk>