summaryrefslogtreecommitdiff
path: root/net/citrix_ica/Makefile
blob: 05c067d7e83a340f46348f07f4c6dfef7473007d (plain)
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
96
97
98
# $NetBSD: Makefile,v 1.18 2004/01/20 12:22:19 agc Exp $
#

# A default so lintpkgsrc is happy, overridden below
DISTNAME=       citrix
PKGNAME=	citrix_ica-7.00
CATEGORIES=	net
MASTER_SITES=	http://download2.citrix.com/files/en/products/client/ica/current/

MAINTAINER=	murray@river-styx.org
HOMEPAGE=	http://www.citrix.com/products/clients/ica/technology.asp
COMMENT=	Citrix(R) client for the Microsoft Windows Terminal Server

.include "../../mk/bsd.prefs.mk"

ONLY_FOR_PLATFORM=      Linux-*-i[3-6]86 NetBSD-*-i386 NetBSD-*-sparc SunOS-*-sparc

.if ${OPSYS} == "NetBSD"
.if (${MACHINE_ARCH} == "i386")
DISTNAME=	linuxx86
PKGNAME=	citrix_ica-7.00.77757
.elif (${MACHINE_ARCH} == "sparc")
DISTNAME=       solaris
PKGNAME=        citrix_ica-7.02.78662
EXTRACT_SUFX=   .tar.Z
.endif
.elif ${OPSYS} == "SunOS"
DISTNAME=	solaris
PKGNAME=	citrix_ica-7.02.78662
EXTRACT_SUFX=	.tar.Z
.elif ${OPSYS} == "Linux"
DISTNAME=	linuxx86
PKGNAME=	citrix_ica-7.00.77757
.endif

# see http://www.citrix.com/download/unix-downloads.htm
.if (${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386")
DEPENDS=        suse_x11>=6.4:../../emulators/${SUSE_DIR_PREFIX}_x11
.endif

LICENSE=                citrix_ica-license
RESTRICTED=             License prohibits redistribution
NO_SRC_ON_FTP=          ${RESTRICTED}
NO_BIN_ON_FTP=          ${RESTRICTED}
NO_SRC_ON_CDROM=        ${RESTRICTED}
NO_BIN_ON_CDROM=        ${RESTRICTED}

PLIST_SRC=	${PKGDIR}/PLIST.pre \
		${PKGDIR}/PLIST.${MACHINE_ARCH} \
		${PKGDIR}/PLIST.post

WRKSRC=         ${WRKDIR}
DIST_SUBDIR=    ${PKGNAME}

CDIR=           ${PREFIX}/lib/ICAClient
BINDIR=         ${PREFIX}/bin

.if (${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "sparc")
.if !exists(/emul/svr4/usr/lib/ld.so)
PKG_FAIL_REASON= "${PKGNAME} requires SVR4 compability - see compat_svr4(8)"
.endif
.endif

PATCHDIR=${WRKDIR}/.patches
pre-patch:
	${MKDIR} ${PATCHDIR}
	${CP} ${PKGDIR}/patches/patch-${MACHINE_ARCH}-* ${PATCHDIR}
	${CHMOD} -R u+w ${WRKSRC}

do-build:
	${SED} s%DESTINATION%${CDIR}% ${FILESDIR}/response.${MACHINE_ARCH} \
		> ${WRKSRC}/response
	${SED} s%DESTINATION%${CDIR}% ${FILESDIR}/wfcmgr \
		> ${WRKSRC}/wfcmgr.x
	${SED} s%DESTINATION%${CDIR}% ${FILESDIR}/wfica \
		> ${WRKSRC}/wfica.x

pre-install:
	@if [ -d "${CDIR}" ]; then                                      \
		${ECHO} "";                                             \
		${ECHO} "*** Please remove ${CDIR} and try again ***";  \
		${ECHO} "";                                             \
		${FALSE};                                               \
	fi

do-install:
	cd ${WRKSRC} && ./setupwfc < response
	${INSTALL_SCRIPT} ${WRKSRC}/wfcmgr.x ${PREFIX}/bin/wfcmgr
	${INSTALL_SCRIPT} ${WRKSRC}/wfica.x ${PREFIX}/bin/wfica
	${SED} "s#/usr/lib/ICAClient#${CDIR}#g" \
		< ${CDIR}/util/icalicense.sh > ${CDIR}/util/icalicense.sh.fixed
	${MV} ${CDIR}/util/icalicense.sh.fixed ${CDIR}/util/icalicense.sh

.if (${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386")
.  include "../../emulators/suse_linux/Makefile.application"
.endif

.include "../../mk/bsd.pkg.mk"