diff options
Diffstat (limited to 'sysutils/sge61/Makefile')
-rw-r--r-- | sysutils/sge61/Makefile | 214 |
1 files changed, 158 insertions, 56 deletions
diff --git a/sysutils/sge61/Makefile b/sysutils/sge61/Makefile index cdbffc98a68c..2c80fac4a759 100644 --- a/sysutils/sge61/Makefile +++ b/sysutils/sge61/Makefile @@ -13,12 +13,22 @@ MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= brooks MAINTAINER= brooks@FreeBSD.org -COMMENT?= Sun Grid Engine, a batch queueing system +COMMENT= Sun Grid Engine, a batch queueing system + +OPTIONS= BDB "Use DB based spooler (currently broken)" off \ + DRMAA "Support the Java DRMAA API (requires native Java)" on \ + QMON "Qmon support (requires X and Motif)" on + +CONFLICTS= sge-5* sgeee-[0-9]* + +.if !exists(/usr/include/sys/_pthreadtypes.h) +EXTRA_PATCHES= ${FILESDIR}/pthread-types.diff +.endif +NOT_FOR_ARCHS= alpha USE_BZIP2= yes USE_GETTEXT= yes USE_GMAKE= yes -USE_MOTIF= yes USE_OPENSSL= yes USE_REINPLACE= yes INSTALLS_SHLIB= yes @@ -27,41 +37,87 @@ LDCONFIG_DIRS= ${SGE_ROOT}/lib/${SGE_ARCH} SGE_BASE?= sge SGE_ROOT= ${PREFIX}/${SGE_BASE} SGE_ARCH= fbsd-${ARCH} -SGE_VERSION= 5.3.6 -SGE_SNAPDATE= 20040330 -SGE_RELEASE= 5.3p6-snap-${SGE_SNAPDATE} +SGE_VERSION= 6.0.4 +SGE_SNAPDATE= 20050726 +SGE_RELEASE= 6.0u4 PLIST_SUB+= SGE_ARCH=${SGE_ARCH} PLIST_SUB+= SGE_BASE=${SGE_BASE} -.if defined(PKGNAMESUFFIX) -.if ${PKGNAMESUFFIX} == ee -PLIST_SUB+= SGE="@comment " -PLIST_SUB+= SGEEE= -.endif -.else -PLIST_SUB+= SGE= -PLIST_SUB+= SGEEE="@comment " -.endif + +SUB_FILES= pkg-message pkg-install +SUB_LIST+= SGE_BASE=${SGE_BASE} + +USE_RC_SUBR= sge.sh PKGMESSAGE= ${WRKDIR}/pkg-message +PKGINSTALL= ${WRKDIR}/pkg-install WRKSRC= ${WRKDIR}/${DISTNAME}/source +TMP_SGE_ROOT= ${WRKDIR}/sgeroot +AIMK_CMD= ${SETENV} ${AIMK_ENV} ./aimk ${AIMK_ARGS} + +INST_PROGS= man common \ + sge_qmaster \ + sge_execd \ + sge_shadowd \ + sge_schedd \ + sge_shepherd \ + sge_coshepherd \ + qstat \ + qsub \ + qalter \ + qconf \ + qdel \ + qacct \ + qmod \ + qsh \ + utilbin \ + jobs \ + qhost \ + qmake \ + qtcsh \ + qping \ + qloadsensor.exe \ + sgepasswd \ + ${QMON} + MANPREFIX= ${SGE_ROOT} -MAN1= qacct.1 qalter.1 qconf.1 qdel.1 qhold.1 qhost.1 qlogin.1 \ - qmake.1 qmod.1 qmon.1 qresub.1 qrls.1 qrsh.1 qselect.1 \ - qsh.1 qstat.1 qsub.1 qtcsh.1 sge_ckpt.1 sge_intro.1 \ - submit.1 -MAN5= access_list.5 accounting.5 calendar_conf.5 checkpoint.5 \ - complex.5 host_conf.5 hostgroup.5 project.5 qtask.5 \ - queue_conf.5 sched_conf.5 sge_aliases.5 sge_conf.5 \ - sge_h_aliases.5 sge_pe.5 sge_request.5 share_tree.5 \ - user.5 usermapping.5 -MAN8= sge_commd.8 sge_execd.8 sge_qmaster.8 sge_schedd.8 \ - sge_shadowd.8 sge_shepherd.8 sgecommdcntl.8 -EXCEPTFILES= arc_depend_irix.asc arc_depend_solaris.asc man +.include "${.CURDIR}/Makefile.man" +EXCEPTFILES= arc_depend_irix.asc arc_depend_solaris.asc man testsuite .include <bsd.port.pre.mk> -.if ${ARCH} == "alpha" -BROKEN= "Does not compile on alpha" + +.if defined(WITH_BDB) +LIB_DEPENDS= db-4.2:${PORTSDIR}/databases/db42 +PLIST_SUB+= BDB_SPOOL= +.else +AIMK_ARGS+= -spool-classic +PLIST_SUB+= BDB_SPOOL="@comment " +.endif + +.if defined(WITH_DRMAA) +USE_JAVA= yes +JAVA_VERSION= 1.4+ +JAVA_OS= native +JAVA_BUILD= jdk +JAVA_RUN= jre +.include "${PORTSDIR}/Mk/bsd.java.mk" +ANT?= ${LOCALBASE}/bin/ant +BUILD_DEPENDS+= ${ANT}:${PORTSDIR}/devel/apache-ant +PLIST_SUB+= DRMAA= +AIMK_ENV+= JAVA_HOME=${JAVA_HOME} +.else +AIMK_ARGS+= -no-java -no-jni +PLIST_SUB+= DRMAA="@comment " +.endif + +.if defined(WITH_QMON) +USE_MOTIF= yes +PLIST_SUB+= QMON= +QMON= qmon +.else +AIMK_ARGS+= -no-qmon +PLIST_SUB+= QMON="@comment " +QMON= noqmon .endif post-patch: @@ -82,27 +138,29 @@ post-patch: @${RM} ${WRKSRC}/dist/util/arch_variables.orig @${FIND} ${WRKSRC} -name Makefile | ${XARGS} \ ${REINPLACE_CMD} "s|-g -O2|${CFLAGS}|" + @${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + -e 's|%%OPENSSLBASE%%|${OPENSSLBASE}|g' < \ + ${FILESDIR}/aimk.private > ${WRKSRC}/aimk.private + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + -e 's|%%OPENSSLBASE%%|${OPENSSLBASE}|g' \ + ${WRKSRC}/scripts/distinst.site do-build: - cd ${BUILD_WRKSRC} && ./aimk -only-depend - cd ${BUILD_WRKSRC} && ./scripts/zerodepend - cd ${BUILD_WRKSRC} && ./aimk depend - cd ${BUILD_WRKSRC} && ./aimk -secure -debug - cd ${BUILD_WRKSRC} && ./aimk -man ${SGE_PRODUCT} - cd ${BUILD_WRKSRC} && ${LN} -fs ./scripts/distinst myinst - -pre-install: -.if defined(MASTERDIR) - ${SH} ${MASTERDIR}/pkg-install ${PKGNAME} PRE-INSTALL -.else - ${SH} ${.CURDIR}/pkg-install ${PKGNAME} PRE-INSTALL -.endif + cd ${WRKSRC} && ${AIMK_CMD} -only-depend + cd ${WRKSRC} && ./scripts/zerodepend + cd ${WRKSRC} && ${AIMK_CMD} depend + cd ${WRKSRC} && \ + ${AIMK_CMD} -secure -debug && \ + ${AIMK_CMD} -man ${SGE_PRODUCT} && + ${MKDIR} ${TMP_SGE_ROOT} + cd ${WRKSRC} && ${SETENV} SGE_ROOT=${TMP_SGE_ROOT} \ + ./scripts/distinst -local -libs ${SGE_ARCH} -- ${INST_PROGS} do-install: ${MKDIR} ${SGE_ROOT} - ${CHOWN} sgeadmin:sgeadmin ${SGE_ROOT} - cd ${BUILD_WRKSRC} && ${SETENV} SGE_ROOT=${SGE_ROOT} ./myinst -allall ${SGEEE_FLAG} ${SGE_ARCH} - cd ${SGE_ROOT} && ${SETENV} SGE_ROOT=${SGE_ROOT} util/setfileperm.sh -auto -noresport sgeadmin sgeadmin ${SGE_ROOT} + cd ${TMP_SGE_ROOT} && \ + ${FIND} . | ${TAR} cTf - - | ${TAR} xUCf ${SGE_ROOT} - + cd ${SGE_ROOT} && ${SETENV} SGE_ROOT=${SGE_ROOT} util/setfileperm.sh -auto ${SGE_ROOT} .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} cd ${WRKSRC}/../doc && ${FIND} * \( -name nonexistant \ @@ -111,23 +169,25 @@ do-install: .endif post-install: - @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ - -e 's|%%SGE_BASE%%|${SGE_BASE}|g' \ - < ${FILESDIR}/pkg-message.in > ${PKGMESSAGE} + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} @${ECHO} -# Automaticly produce the offical machine dependent tarball -# Be sure to do an install first -release-tar: - cd ${SGE_ROOT} && \ +# Automaticly produce the offical machine dependent bits tarball from +# the temporary root. This can be used if FreeBSD machines are to be +# included in a shared SGE installation. +release-tar: build + cd ${TMP_SGE_ROOT} && \ ${TAR} cfvz ${.CURDIR}/sge-${SGE_RELEASE}-bin-${SGE_ARCH}.tar.gz \ - `find . -name ${SGE_ARCH}` + `${FIND} . -name ${SGE_ARCH}` + +######################################################################### +# Maintainer support below this line. No user servicable parts inside. # +######################################################################### -# Produce a distfile for today. This target exists for use by the -# port's maintainer. -SGE_TAG= V53_beta2_BRANCH -TODAY!= /bin/date +%Y%m%d +# Produce a distfile snapshot for today +SGE_TAG= V60u4win_BRANCH +TODAY!= date +%Y%m%d XDISTNAME= sge-${SGE_VERSION}.${TODAY} XDISTFILE= ${DISTDIR}/${XDISTNAME}.tar.bz2 distfile: @@ -140,4 +200,46 @@ distfile: @${RM} -rf ${WRKDIR}/${XDISTNAME} @${RMDIR} ${WRKDIR} 2> /dev/null || true +# Build a pkg-plist and Makefile.man +build-plist: build +#.if defined(WITHOUT_BDB) || defined(WITHOUT_JAVA) || defined(WITHOUT_QMON) +# @echo "ERROR: All OPTIONS must be enabled to build plist!" && ${FALSE} +#.endif + @${FIND} ${TMP_SGE_ROOT}/* -name man -prune -o \ + \( -type f -o -type l \) -print | \ + ${SORT} | \ + ${SED} -e 's|^${TMP_SGE_ROOT}|%%SGE_BASE%%|' \ + -e 's|${SGE_ARCH}|%%SGE_ARCH%%|' \ + -e 's|\(.*libspool[bc].so\)|%%BDB_SPOOL%%\1|' \ + -e 's|\(.*libXltree.so\)|%%QMON%%\1|' \ + -e 's|\(.*qmon.*\)|%%QMON%%\1|' \ + > ${PLIST} + @${FIND} ${WRKSRC}/../doc \( -name nonexistant \ + ${EXCEPTFILES:S/^/-o -name /} \) -a -prune -o -type f -print | \ + ${SORT} | \ + ${SED} -e 's|${WRKSRC}/../doc|%%PORTDOCS%%%%DOCSDIR%%|' \ + >> ${PLIST} + @${FIND} ${TMP_SGE_ROOT}/* -type d | \ + ${SORT} -r | \ + ${SED} -e 's|^${TMP_SGE_ROOT}|@dirrm %%SGE_BASE%%|' \ + -e 's|${SGE_ARCH}|%%SGE_ARCH%%|' \ + -e 's|\(.*qmon.*\)|%%QMON%%\1|' \ + >> ${PLIST} + @${FIND} ${WRKSRC}/../doc \( -name nonexistant \ + ${EXCEPTFILES:S/^/-o -name /} \) -a -prune -o -type d -print | \ + ${SORT} -r | \ + ${SED} -e 's|${WRKSRC}/../doc|%%PORTDOCS%%@dirrm %%DOCSDIR%%|' \ + >> ${PLIST} + @echo '@unexec rmdir %D/%%SGE_BASE%%/ 2>/dev/null || ( echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove %D/%%SGE_BASE%% and its contents manually.")' >> ${PLIST} + @echo "# Do not edit! Auto-generated file." > ${.CURDIR}/Makefile.man + @echo "# See build-plist target in Makefile." >> ${.CURDIR}/Makefile.man + @echo "#" >> ${.CURDIR}/Makefile.man + @${FIND} ${TMP_SGE_ROOT}/man -type f | ${XARGS} ${GREP} -H ^\\.so | \ + ${SED} \ + -e 's|.*/\([^ :/][^ :/]*\):.*/\([^ :/][^ :/]*\)$$|MLINKS+=\2 \1|' \ + >> ${.CURDIR}/Makefile.man + @${FIND} ${TMP_SGE_ROOT}/man -type f | ${XARGS} ${GREP} -L ^\\.so | \ + ${SED} -e 's|.*man\([0-9LN]\)/\(.*\)|MAN\1+=\2|' \ + >> ${.CURDIR}/Makefile.man + .include <bsd.port.post.mk> |