freebsd-ports/net/citrix_ica/Makefile
Tijl Coosemans 6140d3c6aa - Autodetect the installed linux_base port and use LINUX_DEFAULT only as
a last resort.
- Construct a list of DISTFILES for every architecture (amd64, i386).
  Select one list for regular make and all lists for make makesum so linux
  ports can have one combined distinfo file.
- Set DIST_SUBDIR?=centos so there's only one copy of common distfiles.
- Use MASTER_SITES and DISTFILES groups so make fetch is a bit smarter.
- Regenerate all distinfo files.
- For linux_base-c6 (just like linux_base-c7 already does) turn bin, lib,
  lib64 and sbin into symbolic links to the same directory under usr.
  This fixes the problem where some programs/libraries exist under / on
  FreeBSD and /usr on Linux or vice versa and then depending on the order
  of search paths Linux programs may run/load FreeBSD programs/libraries
  and fail.
- Turn usr/share/icons into a symbolic link to LOCALBASE/share/icons so
  Linux programs can find desktop theme icons.  This eliminates the need
  for x11-themes/linux*-hicolor-icon-theme.
- Rename pkg-plist.x86_64 to pkg-plist.amd64.
- Regenerate all pkg-plist files.
- Add @preexec to linux_base pkg-plist that moves existing files in bin,
  lib, lib64, sbin and icons to the new destination before the directories
  are turned into symbolic links.
- Remove several empty directories from linux_base ports.
- Sweep over all linux ports: use consistent style, remove old CONFLICTS,
  remove unused pkg-descr files, add NLS option,...
- Remove old linux arts, esound and openssl-compat ports.
2017-01-31 16:54:21 +00:00

100 lines
2.8 KiB
Makefile

# Created by: msmith
# $FreeBSD$
PORTNAME= citrix_ica
PORTVERSION= 13.4.0
PORTREVISION= 1
CATEGORIES= net comms linux
MASTER_SITES= #
DISTNAME= linuxx86-${PORTVERSION}.10109380
MAINTAINER= ports@FreeBSD.org
COMMENT= Citrix(R) Presentation Server(TM) client
ONLY_FOR_ARCHS= i386 amd64
USES= fakeroot linux webplugin:linux
USE_LINUX= alsalib gtk2 libxml2 openmotif
WEBPLUGIN_DIR= ${PREFIX}/ICAClient
WEBPLUGIN_FILES= npica.so
RESTRICTED= License prohibits redistribution
NO_WRKSUBDIR= yes
NO_BUILD= yes
CDIR= ${PREFIX}/ICAClient
CERTDIR= ${CDIR}/keystore/cacerts
PLIST_SUB= MOZILLA_HOME=${MOZILLA_HOME}
.if defined(ICA_CERTS)
PLIST_SUB+= HAVE_ICA_CERTS="" ICA_CERTS="${ICA_CERTS}" CERTDIR="${CERTDIR}"
.else
PLIST_SUB+= HAVE_ICA_CERTS="@comment "
.endif
SUB_FILES= wfcmgr wfica
SUB_LIST= CDIR=${CDIR}
.include <bsd.port.pre.mk>
.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
IGNORE=May not be redistributed due to licensing. Please visit https://www.citrix.com/downloads/citrix-receiver/linux/ accept their license and download ${DISTFILES} into ${DISTDIR}
.endif
.if defined(ICA_CERTS)
.for f in ${ICA_CERTS}
PLIST_FILES+= ${CERTDIR}/${f}
HASH_${f}!= openssl x509 -noout -hash -in ${DISTDIR}/${f}
PLIST_FILES+= ${CERTDIR}/${HASH_${f}}.0
.endfor
.endif
pre-fetch:
.if defined(ICA_CERTS)
.for f in ${ICA_CERTS}
@echo "Checking ${f}"
.if !exists(${DISTDIR}/${f})
@echo "Cert ${f} not found."
@exit 1
.endif
.endfor
.endif
post-patch:
# - linux syscall epoll_create is not yet implemented
# - disable Flash redirection as it generates a deadlock in linux_sys_futex
@${REINPLACE_CMD} \
-e 's|^ClientAudio=On|ClientAudio=Off|' \
-e 's|^FlashV2=On|FlashV2=Off|' \
${WRKSRC}/linuxx86/linuxx86.cor/nls/*/module.ini
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${STAGEDIR}${PREFIX}|g' ${WRKSRC}/linuxx86/hinst
do-install:
@if (test -d "${CDIR}") ; \
then \
${ECHO} "-----------------------------------------------------------" ; \
${ECHO} "" ; \
${ECHO} "A ${CDIR} installation does already exist." ; \
${ECHO} "Please move it away or delete the old port" ; \
${ECHO} "" ; \
${ECHO} "-----------------------------------------------------------" ; \
${FALSE} ; \
fi
cd ${WRKSRC} && ${FAKEROOT} ${SH} -c './setupwfc'
${INSTALL_SCRIPT} ${WRKDIR}/wfcmgr ${STAGEDIR}${PREFIX}/bin/wfcmgr
${INSTALL_SCRIPT} ${WRKDIR}/wfica ${STAGEDIR}${PREFIX}/bin/wfica
# XXX: This is missing a "${BRANDELF} -t Linux <executables>".
${MKDIR} ${STAGEDIR}${CDIR}
${MKDIR} ${STAGEDIR}${CDIR}/config
cd ${WRKSRC}/linuxx86/linuxx86.cor/ && ${COPYTREE_SHARE} . ${STAGEDIR}${CDIR}
${CP} ${WRKSRC}/setupwfc ${STAGEDIR}${CDIR}
.if defined(ICA_CERTS)
${MKDIR} ${STAGEDIR}${CERTDIR}
.for f in ${ICA_CERTS}
${INSTALL_DATA} ${DISTDIR}/${f} ${STAGEDIR}${CERTDIR}
${LN} -sf ${f} ${STAGEDIR}${CERTDIR}/$$(openssl x509 -noout -hash -in ${DISTDIR}/${f}).0
.endfor
.endif
.include <bsd.port.post.mk>