61378a37df
The linux_base port is now at RH version 7.
177 lines
5.0 KiB
Makefile
177 lines
5.0 KiB
Makefile
# New ports collection makefile for: StarOffice 6.0
|
|
# Date created: 03 October 2001
|
|
# Whom: Martin Blapp
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= staroffice
|
|
PORTVERSION= 6.0
|
|
CATEGORIES= editors linux
|
|
MASTER_SITES=
|
|
DISTNAME= so-6_0-ga-bin-linux-en.bin
|
|
DISTFILES= so-6_0-ga-bin-linux-en.bin
|
|
.if defined(WITH_ADABAS)
|
|
DISTFILES+= soa-6_0-ga-bin-linux-en.bin
|
|
.endif
|
|
|
|
MAINTAINER= mbr@FreeBSD.org
|
|
|
|
ONLY_FOR_ARCHS= i386
|
|
NO_CDROM= 'Must be downloaded direct from Sun via www interface'
|
|
|
|
USE_LINUX= yes
|
|
IS_INTERACTIVE= yes
|
|
NO_BUILD= yes
|
|
SOVERSION= ${PORTNAME}${PORTVERSION}
|
|
WRKSRC= ${WRKDIR}/${SOVERSION}
|
|
TMPDIR= ${WRKDIR}/tmp
|
|
LD_PATH= ${TMPDIR}:${WRKSRC}:${LINUXBASE}/lib:${LINUXBASE}/usr/lib
|
|
INSTDB.INS= ${PREFIX}/${SOVERSION}/program/instdb.ins
|
|
ADABAS_DIST= soa-6_0-ga-bin-linux-en.bin
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
SIZE!= /bin/df -k . | ${TAIL} -n 1 | ${AWK} '{print $$4}'
|
|
LINPROCFS!= /sbin/mount | ${GREP} linprocfs | ${AWK} '{print $1}'
|
|
|
|
pre-fetch:
|
|
.if ${LINPROCFS}
|
|
@${ECHO}
|
|
@${ECHO} Check if linprocfs is running: YES
|
|
.else
|
|
@${ECHO}
|
|
@${ECHO} ERROR:
|
|
@${ECHO}
|
|
@${ECHO} Staroffice setup needs a running linprocfs, which is not
|
|
@${ECHO} activated on your system. Please read the linprocfs\(5\)
|
|
@${ECHO} manpage and add the following line to /etc/fstab:
|
|
@${ECHO}
|
|
@${ECHO} linproc /compat/linux/proc linprocfs rw 0 0
|
|
@${ECHO}
|
|
@${FALSE}
|
|
.endif
|
|
.if !exists(${LINUXBASE}/etc/mtab)
|
|
@${ECHO}
|
|
@${ECHO} ERROR:
|
|
@${ECHO}
|
|
@${ECHO} The file ${LINUXBASE}/etc/mtab is missing.
|
|
@${ECHO} Staroffice needs this file else some functions
|
|
@${ECHO} are not working. You can create it with
|
|
@${ECHO}
|
|
@${ECHO} touch ${LINUXBASE}/etc/mtab
|
|
@${ECHO}
|
|
@${FALSE}
|
|
.else
|
|
@${ECHO} Check if ${LINUXBASE}/etc/mtab exists: YES
|
|
.endif
|
|
.if ${OSVERSION} < 450000
|
|
@${ECHO}
|
|
@${ECHO} ERROR:
|
|
@${ECHO}
|
|
@${ECHO} OS-VERSION ${OSVERSION}
|
|
@${ECHO}
|
|
@${ECHO} Staroffice depends on a scripting fix for
|
|
@${ECHO} /usr/src/sys/i386/linux/linux_sysvec.c
|
|
@${ECHO} \(revision 1.55.2.1 or higher\)
|
|
@${ECHO}
|
|
@${ECHO} Please upgrade to FreeBSD 4.5
|
|
@${ECHO}
|
|
@${FALSE}
|
|
.endif
|
|
.if ${SIZE} < 400000
|
|
@${ECHO}
|
|
@${ECHO} ERROR:
|
|
@${ECHO}
|
|
@${ECHO} There is only ${SIZE}K free disk space in
|
|
@${ECHO} ${WRKDIRPREFIX}. To unpack Staroffice needs
|
|
@${ECHO} at least 400000K free diskspace.
|
|
@${FALSE}
|
|
.endif
|
|
.if !defined(WITH_ADABAS)
|
|
@${ECHO}
|
|
@${ECHO} If you like to install staroffice with ADABAS database support,
|
|
@${ECHO} cancel this installation now and start make again with
|
|
@${ECHO} WITH_ADABAS=YES.
|
|
@${ECHO}
|
|
.endif
|
|
.if !exists(${DISTDIR}/${DISTNAME})
|
|
IGNORE="Please manually download ${DISTNAME} from http://www.sun.com/staroffice. Put ${DISTNAME} into the directory ${DISTDIR} and run make again."
|
|
.endif
|
|
|
|
do-extract:
|
|
.if !defined(DISPLAY) || ${DISPLAY} == ""
|
|
@ ${ECHO}
|
|
@ ${ECHO} Can\'t open display:
|
|
@ ${ECHO} Please check your DISPLAY variable.
|
|
@ ${ECHO}
|
|
@ ${FALSE}
|
|
.else
|
|
@${MKDIR} ${WRKSRC}
|
|
@${MKDIR} ${TMPDIR}
|
|
@${CP} ${_DISTDIR}/${DISTNAME} ${WRKSRC}
|
|
@${CHMOD} 755 ${WRKSRC}/${DISTNAME}
|
|
@cd ${WRKSRC}
|
|
@SAL_IGNOREXERRORS=1 ${WRKSRC}/${DISTNAME} -extract ${WRKSRC}
|
|
@${RM} ${WRKSRC}/${DISTNAME}
|
|
.if defined(WITH_ADABAS)
|
|
@${CP} ${_DISTDIR}/${ADABAS_DIST} ${WRKSRC}
|
|
@${CHMOD} 755 ${WRKSRC}/${ADABAS_DIST}
|
|
.endif
|
|
.endif
|
|
|
|
post-configure:
|
|
@${PERL} -pi.orig -e \
|
|
's|DefaultDestPath = "staroffice%PRODUCTVERSION";|DefaultDestPath = "${PREFIX}/staroffice%PRODUCTVERSION";|' \
|
|
${WRKSRC}/setup.ins
|
|
|
|
do-install:
|
|
.if !defined(DISPLAY) || ${DISPLAY} == ""
|
|
@ ${ECHO}
|
|
@ ${ECHO} Can\'t open display:
|
|
@ ${ECHO} Please check your DISPLAY variable.
|
|
@ ${ECHO}
|
|
@ ${FALSE}
|
|
.else
|
|
.if exists(${LINUXBASE}/${PREFIX})
|
|
@${LN} -fs ${LINUXBASE}/${PREFIX}/${SOVERSION} ${PREFIX}/${SOVERSION}
|
|
.endif
|
|
.if !exists(${LINUXBASE}/usr/X11R6/lib/libXrender.so)
|
|
@${LN} -fs ${LINUXBASE}/usr/X11R6/lib/libXrender.so.1.0 \
|
|
${WRKDIR}/tmp/libXrender.so
|
|
.endif
|
|
@${CAT} ${PKGMESSAGE}
|
|
@-SAL_IGNOREXERRORS=1 PATH="/bin:${PATH}" LD_LIBRARY_PATH=${LD_PATH} \
|
|
TEMP=${TMPDIR} ${LINUXBASE}/bin/sh -c '${WRKSRC}/setup /net'
|
|
@if [ -f ${PREFIX}/${SOVERSION}/program/setup ]; then \
|
|
${ECHO} ; \
|
|
${ECHO} Ignore the error-message. StarOffice6.0 has been installed ; \
|
|
${ECHO} successfully on your system. ; \
|
|
${ECHO} ; \
|
|
else \
|
|
${ECHO} ; \
|
|
${ECHO} An error occured during StarOffice6.0 install. Please send a mail with debug-output and ; \
|
|
${ECHO} some information about your FreeBSD-environment to mb@imp.ch. Thanks. ; \
|
|
${ECHO} ; \
|
|
${FALSE} ; \
|
|
fi
|
|
.endif
|
|
.if defined(WITH_ADABAS)
|
|
@-SAL_IGNOREXERRORS=1 PATH="/bin:${PATH}" LD_LIBRARY_PATH=${LD_PATH} \
|
|
TEMP=${TMPDIR} ${LINUXBASE}/bin/sh -c '${WRKSRC}/${ADABAS_DIST}'
|
|
.endif
|
|
|
|
post-install:
|
|
@${MV} ${INSTDB.INS} ${INSTDB.INS}.orig
|
|
@${SED} -e 's%DefaultDestPath = "${PREFIX}/staroffice%DefaultDestPath = "staroffice%' \
|
|
${INSTDB.INS}.orig > ${INSTDB.INS}
|
|
.if !exists(${LINUXBASE}/usr/X11R6/lib/libXrender.so)
|
|
@${LN} -fs ${LINUXBASE}/usr/X11R6/lib/libXrender.so.1.0 ${PREFIX}/${SOVERSION}/program/libXrender.so
|
|
.endif
|
|
|
|
install-user:
|
|
@-SAL_IGNOREXERRORS=1 PATH="/bin:${PATH}" ${LINUXBASE}/bin/sh -c \
|
|
${PREFIX}/${SOVERSION}/program/setup
|
|
|
|
.include <bsd.port.post.mk>
|