summaryrefslogtreecommitdiff
path: root/net/citrix_ica/Makefile
blob: 51a6af45e3d3a5b90fe7ee16d827c5628f0fd1f4 (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
# $NetBSD: Makefile,v 1.36 2007/07/29 05:19:46 jlam Exp $

DISTNAME=	citrix_ica-10.6.115659
CATEGORIES=	net
MASTER_SITES=	# empty

MAINTAINER=	sborrill@NetBSD.org
HOMEPAGE=	http://www.citrix.com/English/SS/downloads/downloads.asp?dID=2755
COMMENT=	Citrix(R) ICA client for the Citrix(R) Presentation Server(TM)

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}

EMUL_PLATFORMS=		linux-i386
EMUL_PLATFORMS+=	solaris-sparc
EMUL_MODULES.linux=	locale motif x11

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

.if ${EMUL_PLATFORM} == "linux-i386"
DISTNAME=	en.linuxx86
PKGNAME=	citrix_ica-10.6.115659
MASTER_SITES=	http://download2.citrix.com/FILES/en/products/Linux10/
.elif ${EMUL_PLATFORM} == "solaris-sparc"
DISTNAME=	en.solaris
PKGNAME=	citrix_ica-8.46.110465
MASTER_SITES=	http://www.citrix.com/site/resources/dynamic/software/
EXTRACT_SUFX=	.tar.Z
.endif

WRKSRC=		${WRKDIR}
DIST_SUBDIR=	${PKGNAME_NOREV}

CDIR=		${PREFIX}/lib/ICAClient
USE_TOOLS+=	patch

INSTALLATION_DIRS=	bin

do-patch:
	(cd ${WRKSRC}; \
	for f in ${PATCHDIR}/patch-${MACHINE_ARCH}-*;do \
	${PATCH} ${PATCH_ARGS} <$$f >/dev/null 2>&1 || ${TRUE}; \
	done)

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:
	${RUN} if [ `${ID} -u` != 0 ]; then				\
		${ECHO} "";                                             \
		${ECHO} "*** ${PKGNAME} must be installed with"		\
			"superuser privileges ***";			\
		${ECHO} "";                                             \
		${FALSE};						\
	fi
	${RUN} 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

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