diff options
author | bicatali <bicatali@32389bae-6d03-0410-99cf-db05cde120eb> | 2006-03-10 19:02:46 +0000 |
---|---|---|
committer | bicatali <bicatali@32389bae-6d03-0410-99cf-db05cde120eb> | 2006-03-10 19:02:46 +0000 |
commit | 7bf2e10beab4c406cbdfa3bf8c0522101891e9ff (patch) | |
tree | 4683d87d4f0fe51987602da705ef53900222fab0 /sys-cluster/torque | |
parent | matplotlib-0.87.1 version bump and doc clean (diff) | |
download | sci-7bf2e10beab4c406cbdfa3bf8c0522101891e9ff.tar.gz sci-7bf2e10beab4c406cbdfa3bf8c0522101891e9ff.tar.bz2 sci-7bf2e10beab4c406cbdfa3bf8c0522101891e9ff.zip |
added sys-cluster/{torque,openmpi} very experimental ebuilds
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@117 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sys-cluster/torque')
8 files changed, 761 insertions, 0 deletions
diff --git a/sys-cluster/torque/Manifest b/sys-cluster/torque/Manifest new file mode 100644 index 000000000..a4015e643 --- /dev/null +++ b/sys-cluster/torque/Manifest @@ -0,0 +1,7 @@ +MD5 a86d41db4f868c9baa3365bb96c60e5f files/digest-torque-2.0.0_p7 67 +MD5 7647c23d0d5189ae7a9c2a4322ce1bb6 files/torque-2.0.0_p5-destdir-fixes.patch 539 +MD5 5f41eb14cea3408472c133849550faef files/torque-2.0.0_p5-makedepend.patch 754 +MD5 3ea9d3a2e1cff3ccd224f0e0b33da6d5 files/torque-2.0.0_p5-respect-ldflags.patch 2710 +MD5 f362dc4addcab08a5d537913b99c9484 files/torque-2.0.0_p5-setuid-safety.patch 997 +MD5 b551147a374f034bf251490ce985be6b files/torque-2.0.0_p7-respect-destdir.patch 21832 +MD5 c9bcf93e9f31d3c5968db2365e5c621c torque-2.0.0_p7.ebuild 4583 diff --git a/sys-cluster/torque/files/digest-torque-2.0.0_p7 b/sys-cluster/torque/files/digest-torque-2.0.0_p7 new file mode 100644 index 000000000..550bce77f --- /dev/null +++ b/sys-cluster/torque/files/digest-torque-2.0.0_p7 @@ -0,0 +1 @@ +MD5 5afdb5079461536981fb71dd92ef8207 torque-2.0.0p7.tar.gz 2291536 diff --git a/sys-cluster/torque/files/torque-2.0.0_p5-destdir-fixes.patch b/sys-cluster/torque/files/torque-2.0.0_p5-destdir-fixes.patch new file mode 100644 index 000000000..f13af48d0 --- /dev/null +++ b/sys-cluster/torque/files/torque-2.0.0_p5-destdir-fixes.patch @@ -0,0 +1,13 @@ +diff -urN torque-2.0.0p2/src/gui/Makefile.in torque-2.0.0p20patched/src/gui/Makefile.in +--- torque-2.0.0p2/src/gui/Makefile.in 2005-12-11 14:05:12.000000000 +0100 ++++ torque-2.0.0p2patched/src/gui/Makefile.in 2005-12-11 14:03:23.000000000 +0100 +@@ -155,7 +155,7 @@ + # + @echo Install xpbs + $(INSTALL) -m 755 xpbs $(DESTDIR)$(bindir)/xpbs +- @chmod 755 $(bindir)/xpbs 2> /dev/null ++ @chmod 755 $(DESTDIR)$(bindir)/xpbs 2> /dev/null + # + $(INSTALL) -m 755 buildindex $(DESTDIR)$(XPBS_LIB) + $(INSTALL) -m 644 xpbsrc $(DESTDIR)$(XPBS_LIB) + diff --git a/sys-cluster/torque/files/torque-2.0.0_p5-makedepend.patch b/sys-cluster/torque/files/torque-2.0.0_p5-makedepend.patch new file mode 100644 index 000000000..7e707c0c8 --- /dev/null +++ b/sys-cluster/torque/files/torque-2.0.0_p5-makedepend.patch @@ -0,0 +1,17 @@ +--- torque-2.0.0p5/buildutils/makedepend-sh.old 2005-12-15 21:14:28.000000000 -0500 ++++ torque-2.0.0p5/buildutils/makedepend-sh 2006-01-23 12:39:36.000000000 -0500 +@@ -572,11 +572,11 @@ + # + test -n "$mksrcs" && echo $d/$s >> $SRCS + test "$verbose" -lt 2 && errout='2> /dev/null' +- ++ + eval $CPP $arg_cc $d/$s $errout | \ + sed -n -e "s;^\# [0-9][0-9 ]*\"\(.*\)\";$f: \1;p" | \ +- grep -v "//\$" | \ +- grep -v "$s\$" | grep -v command | grep -v built-in | \ ++ grep -v "$s\$" | \ ++ grep -v ">$" | \ + sed -e 's;\([^ :]*: [^ ]*\).*;\1;' \ + >> $TMP + ;; diff --git a/sys-cluster/torque/files/torque-2.0.0_p5-respect-ldflags.patch b/sys-cluster/torque/files/torque-2.0.0_p5-respect-ldflags.patch new file mode 100644 index 000000000..d60cc5a87 --- /dev/null +++ b/sys-cluster/torque/files/torque-2.0.0_p5-respect-ldflags.patch @@ -0,0 +1,61 @@ +diff -urN torque-2.0.0p2.orig/src/iff/Makefile.in torque-2.0.0p2/src/iff/Makefile.in +--- torque-2.0.0p2.orig/src/iff/Makefile.in 2005-11-09 18:30:16.000000000 +0100 ++++ torque-2.0.0p2/src/iff/Makefile.in 2005-12-11 03:01:15.000000000 +0100 +@@ -114,7 +114,7 @@ + $(INSTALL) -m 4755 $(TARGET) $(sbindir) + + pbs_iff: $(OBJS) $(PBS_LIBS) +- $(CC) $(CFLAGS) -o $@ $(OBJS) $(PBS_LIBS) $(LIBS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(PBS_LIBS) $(LIBS) + + @mk_cleanup@ + @mk_tail@ +diff -urN torque-2.0.0p2.orig/src/mom_rcp/Makefile.in torque-2.0.0p2/src/mom_rcp/Makefile.in +--- torque-2.0.0p2.orig/src/mom_rcp/Makefile.in 2005-11-09 18:30:17.000000000 +0100 ++++ torque-2.0.0p2/src/mom_rcp/Makefile.in 2005-12-11 03:01:15.000000000 +0100 +@@ -115,7 +115,7 @@ + $(INSTALL) -m 4755 $(TARGET) $(sbindir) + + $(TARGET): $(OBJS) +- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS) + + + # needed for make depend +diff -urN torque-2.0.0p2.orig/src/scheduler.basl/Makefile.in torque-2.0.0p2/src/scheduler.basl/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.basl/Makefile.in 2005-11-09 18:30:20.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.basl/Makefile.in 2005-12-11 03:01:15.000000000 +0100 +@@ -133,7 +133,7 @@ + $(CC) $(CFLAGS) -o $@ $(OBJS_COMMON) $(OBJS_COMP) $(LIBRARIES) + + pbs_sched: $(OBJS_COMMON) $(OBJS_SCHED) +- $(CC) $(CFLAGS) -o $@ $(OBJS_COMMON) $(OBJS_SCHED) $(LIBRARIES) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS_COMMON) $(OBJS_SCHED) $(LIBRARIES) + + pbs_sched.o: $(SCHD_SRC) $(srcdir)/af_system.h $(srcdir)/af_server.h basl2c + @if expr $(SCHD_SRC) : '.*\.basl$$' > /dev/null 2>&1; then \ +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/Makefile.in torque-2.0.0p2/src/scheduler.cc/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/Makefile.in 2005-11-09 18:30:17.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/Makefile.in 2005-12-11 03:01:15.000000000 +0100 +@@ -127,7 +127,7 @@ + $(INSTALL) -m 700 $(TARGET) $(sbindir) + + $(TARGET): $(OBJS) $(SCHEDLIB) +- $(CC) $(CFLAGS) -o $@ $(OBJS) $(SCHEDLIB) $(PBSLIBS) $(LIBS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(SCHEDLIB) $(PBSLIBS) $(LIBS) + + distclean:: + -(cd $(SCHD_BUILD) && $(MAKE) $@; exit 0) > /dev/null 2>&1 +diff -urN torque-2.0.0p2.orig/src/scheduler.tcl/Makefile.in torque-2.0.0p2/src/scheduler.tcl/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.tcl/Makefile.in 2005-11-09 18:30:11.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.tcl/Makefile.in 2005-12-11 03:01:15.000000000 +0100 +@@ -119,7 +119,7 @@ + $(INSTALL) -m 700 $(TARGET) $(sbindir) + + $(TARGET): $(OBJS) +- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBRARIES) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBRARIES) + + @mk_cleanup@ + @mk_tail@ + diff --git a/sys-cluster/torque/files/torque-2.0.0_p5-setuid-safety.patch b/sys-cluster/torque/files/torque-2.0.0_p5-setuid-safety.patch new file mode 100644 index 000000000..2f4cb28e8 --- /dev/null +++ b/sys-cluster/torque/files/torque-2.0.0_p5-setuid-safety.patch @@ -0,0 +1,25 @@ +diff -urN torque-2.0.0p2.org/src/iff/Makefile.in torque-2.0.0p2/src/iff/Makefile.in +--- torque-2.0.0p2.org/src/iff/Makefile.in 2005-12-11 14:03:23.000000000 +0100 ++++ torque-2.0.0p2/src/iff/Makefile.in 2005-12-11 14:12:44.000000000 +0100 +@@ -114,7 +114,7 @@ + $(INSTALL) -m 4755 $(TARGET) $(DESTDIR)$(sbindir) + + pbs_iff: $(OBJS) $(PBS_LIBS) +- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(PBS_LIBS) $(LIBS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -Wl,-z,now -o $@ $(OBJS) $(PBS_LIBS) $(LIBS) + + @mk_cleanup@ + @mk_tail@ +diff -urN torque-2.0.0p2.org/src/mom_rcp/Makefile.in torque-2.0.0p2/src/mom_rcp/Makefile.in +--- torque-2.0.0p2.org/src/mom_rcp/Makefile.in 2005-12-11 14:03:23.000000000 +0100 ++++ torque-2.0.0p2/src/mom_rcp/Makefile.in 2005-12-11 14:13:21.000000000 +0100 +@@ -115,7 +115,7 @@ + $(INSTALL) -m 4755 $(TARGET) $(DESTDIR)$(sbindir) + + $(TARGET): $(OBJS) +- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -Wl,-z,now -o $@ $(OBJS) $(LIBS) + + +# needed for make depend + diff --git a/sys-cluster/torque/files/torque-2.0.0_p7-respect-destdir.patch b/sys-cluster/torque/files/torque-2.0.0_p7-respect-destdir.patch new file mode 100644 index 000000000..69831bad4 --- /dev/null +++ b/sys-cluster/torque/files/torque-2.0.0_p7-respect-destdir.patch @@ -0,0 +1,493 @@ +diff -urN torque-2.0.0p2.orig/buildutils/mkincludes/lib.mk.in torque-2.0.0p2/buildutils/mkincludes/lib.mk.in +--- torque-2.0.0p2.orig/buildutils/mkincludes/lib.mk.in 2005-11-09 18:30:21.000000000 +0100 ++++ torque-2.0.0p2/buildutils/mkincludes/lib.mk.in 2005-12-11 02:51:06.000000000 +0100 +@@ -16,7 +16,7 @@ + + install:: $(TARGET) + @# a two step process is best to work around broken installs +- $(INSTALL) -d $(libdir) && \ +- $(INSTALL) -m 644 $(TARGET) $(libdir)/$(TARGET) ++ $(INSTALL) -d $(DESTDIR)$(libdir) && \ ++ $(INSTALL) -m 644 $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + + # END lib.mk +diff -urN torque-2.0.0p2.orig/buildutils/pbs_mkdirs.in torque-2.0.0p2/buildutils/pbs_mkdirs.in +--- torque-2.0.0p2.orig/buildutils/pbs_mkdirs.in 2005-11-09 18:30:21.000000000 +0100 ++++ torque-2.0.0p2/buildutils/pbs_mkdirs.in 2005-12-11 02:51:06.000000000 +0100 +@@ -140,6 +140,7 @@ + # dlist will contain a list of directory names to make + id_dlist="" + ++ id_dname=${DESTDIR}$id_dname + while [ ! \( -z "$id_dname" -o "$id_dname" = / -o \ + "$id_dname" = "." \) ]; do + +@@ -188,15 +189,15 @@ + echo $idv_dvarname exists and is not a directory 1>&2 + return 1 + elif [ -d $idv_dname ] ; then +- chmod $idv_mode $idv_dname +- test -n "$idv_owner" && chown $idv_owner $idv_dname ++ chmod $idv_mode ${DESTDIR}$idv_dname > /dev/null 2>&1 ++ test -n "$idv_owner" && chown $idv_owner ${DESTDIR}$idv_dname > /dev/null 2>&1 + return 0 + elif [ ! -d $idv_dname ] ; then + test -n "$verbose" && echo Creating $idv_dname + install_dir `dirname $idv_dname` 755 $idv_owner && \ +- mkdir $idv_dname && chmod $idv_mode $idv_dname || return 1 ++ mkdir ${DESTDIR}$idv_dname && chmod $idv_mode ${DESTDIR}$idv_dname || return 1 + if test -n "$idv_owner"; then +- chown $idv_owner $idv_name || return 1 ++ chown $idv_owner ${DESTDIR}$idv_name || return 1 + fi + + fi +@@ -207,6 +208,7 @@ + check_env() + { + test -n "$verbose" && echo Making environment file ++ PBS_ENVIRON="${DESTDIR}${PBS_ENVIRON}" + if [ ! -f $PBS_ENVIRON ] ; then + install_dir `dirname $PBS_ENVIRON` + echo "PATH=/bin:/usr/bin" > $PBS_ENVIRON +@@ -324,6 +326,7 @@ + # if default already exists, leave alone + + # solaris fails on '-e', use '-f' ++ PBS_DEFAULT_FILE="${DESTDIR}${PBS_DEFAULT_FILE}" + if [ ! -f $PBS_DEFAULT_FILE ]; then + rm -f $PBS_DEFAULT_FILE > /dev/null 2>&1 + echo $PBS_DEFAULT_SERVER > $PBS_DEFAULT_FILE && \ +diff -urN torque-2.0.0p2.orig/doc/Makefile.in torque-2.0.0p2/doc/Makefile.in +--- torque-2.0.0p2.orig/doc/Makefile.in 2005-11-11 20:49:57.000000000 +0100 ++++ torque-2.0.0p2/doc/Makefile.in 2005-12-11 02:56:26.000000000 +0100 +@@ -196,49 +196,49 @@ + + install1: ${MAN1} + @echo Installing section 1 man pages +- @$(INSTALL) -d -m 755 $(PBS_MAN) && \ +- $(INSTALL) -d -m 755 $(PBS_MAN1) && \ ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN) && \ ++ $(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN1) && \ + for t in $?; do \ + tt=`basename $$t B`; \ +- ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >${PBS_MAN1}/$${tt}$(MAN_SUFFIX); \ +- chmod 644 ${PBS_MAN1}/$${tt}$(MAN_SUFFIX); \ ++ ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >$(DESTDIR)${PBS_MAN1}/$${tt}$(MAN_SUFFIX); \ ++ chmod 644 $(DESTDIR)${PBS_MAN1}/$${tt}$(MAN_SUFFIX); \ + done + + install3: $(MAN3) + @echo Installing section 3 man pages +- @$(INSTALL) -d -m 755 $(PBS_MAN) && \ +- $(INSTALL) -d -m 755 $(PBS_MAN3) && \ ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN) && \ ++ $(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN3) && \ + for t in $?; do \ + tt=`basename $$t B`; \ +- ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >${PBS_MAN3}/$${tt}$(MAN_SUFFIX); \ +- chmod 644 ${PBS_MAN3}/$${tt}$(MAN_SUFFIX); \ ++ ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >$(DESTDIR)${PBS_MAN3}/$${tt}$(MAN_SUFFIX); \ ++ chmod 644 $(DESTDIR)${PBS_MAN3}/$${tt}$(MAN_SUFFIX); \ + done + + install7: $(MAN7) + @echo Installing section 7 man pages +- @$(INSTALL) -d -m 755 $(PBS_MAN) && \ +- $(INSTALL) -d -m 755 $(PBS_MAN7) && \ ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN) && \ ++ $(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN7) && \ + for t in $?; do \ + tt=`basename $$t B`; \ +- ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >${PBS_MAN7}/$${tt}$(MAN_SUFFIX); \ +- chmod 644 ${PBS_MAN7}/$${tt}$(MAN_SUFFIX); \ ++ ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >$(DESTDIR)${PBS_MAN7}/$${tt}$(MAN_SUFFIX); \ ++ chmod 644 $(DESTDIR)${PBS_MAN7}/$${tt}$(MAN_SUFFIX); \ + done +- @rm -f ${PBS_MAN7}/pbs_resources.7$(MAN_SUFFIX) +- @if test -f ${PBS_MAN7}/pbs_resources_$(DEFAULT_MAN_RESOURCE_TYPE).7$(MAN_SUFFIX) ;then \ +- ln ${PBS_MAN7}/pbs_resources_$(DEFAULT_MAN_RESOURCE_TYPE).7$(MAN_SUFFIX) ${PBS_MAN7}/pbs_resources.7$(MAN_SUFFIX); \ ++ @rm -f $(DESTDIR)${PBS_MAN7}/pbs_resources.7$(MAN_SUFFIX) ++ @if test -f $(DESTDIR)${PBS_MAN7}/pbs_resources_$(DEFAULT_MAN_RESOURCE_TYPE).7$(MAN_SUFFIX) ;then \ ++ ln $(DESTDIR)${PBS_MAN7}/pbs_resources_$(DEFAULT_MAN_RESOURCE_TYPE).7$(MAN_SUFFIX) $(DESTDIR)${PBS_MAN7}/pbs_resources.7$(MAN_SUFFIX); \ + fi + + install8: $(MAN8) + @echo Installing section 8 man pages +- @$(INSTALL) -d -m 755 $(PBS_MAN) && \ +- $(INSTALL) -d -m 755 $(PBS_MAN8) && \ ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN) && \ ++ $(INSTALL) -d -m 755 $(DESTDIR)$(PBS_MAN8) && \ + for t in $?; do \ + tt=`basename $$t B`; \ +- ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >${PBS_MAN8}/$${tt}$(MAN_SUFFIX); \ +- chmod 644 ${PBS_MAN8}/$${tt}$(MAN_SUFFIX); \ ++ ${SOELIM} -d $(DOCSRC)/ers $$t | sed -e 's/^\.Sh/.SH/' >$(DESTDIR)${PBS_MAN8}/$${tt}$(MAN_SUFFIX); \ ++ chmod 644 $(DESTDIR)${PBS_MAN8}/$${tt}$(MAN_SUFFIX); \ + done +- @rm -f ${PBS_MAN8}/pbs_sched.8$(MAN_SUFFIX) +- @case ${SCHD_TYPE} in cc|tcl|basl) ln ${PBS_MAN8}/pbs_sched_${SCHD_TYPE}.8$(MAN_SUFFIX) ${PBS_MAN8}/pbs_sched.8$(MAN_SUFFIX);; esac ++ @rm -f $(DESTDIR)${PBS_MAN8}/pbs_sched.8$(MAN_SUFFIX) ++ @case ${SCHD_TYPE} in cc|tcl|basl) ln $(DESTDIR)${PBS_MAN8}/pbs_sched_${SCHD_TYPE}.8$(MAN_SUFFIX) $(DESTDIR)${PBS_MAN8}/pbs_sched.8$(MAN_SUFFIX);; esac + + depend:: + +diff -urN torque-2.0.0p2.orig/src/cmds/Makefile.in torque-2.0.0p2/src/cmds/Makefile.in +--- torque-2.0.0p2.orig/src/cmds/Makefile.in 2005-11-09 18:30:13.000000000 +0100 ++++ torque-2.0.0p2/src/cmds/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -135,12 +135,12 @@ + $(PBS_MKDIRS) clients + $(PBS_MKDIRS) aux + $(PBS_MKDIRS) default +- $(INSTALL) -d -m 755 $(bindir) && \ ++ $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) && \ + for f in $(USER) $(OPER) $(ADMN) $(SCRIPTS) ; do \ +- $(INSTALL) -m 755 $$f $(bindir)/$$f ; \ ++ $(INSTALL) -m 755 $$f $(DESTDIR)$(bindir)/$$f ; \ + done + for f in $(SUPP) ; do \ +- $(INSTALL) -m 755 $$f $(sbindir)/$$f ; \ ++ $(INSTALL) -m 755 $$f $(DESTDIR)$(sbindir)/$$f ; \ + done + + # +diff -urN torque-2.0.0p2.orig/src/gui/Ccode/Makefile.in torque-2.0.0p2/src/gui/Ccode/Makefile.in +--- torque-2.0.0p2.orig/src/gui/Ccode/Makefile.in 2005-11-09 18:30:12.000000000 +0100 ++++ torque-2.0.0p2/src/gui/Ccode/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -115,9 +115,9 @@ + build: $(TARGETS) + + install: build +- -test -d $(XPBS_LIB)/bin || $(INSTALL) -d $(XPBS_LIB)/bin ++ -test -d $(DESTDIR)$(XPBS_LIB)/bin || $(INSTALL) -d $(DESTDIR)$(XPBS_LIB)/bin + for f in $(TARGETS); do \ +- $(INSTALL) -m 755 $$f $(XPBS_LIB)/bin; \ ++ $(INSTALL) -m 755 $$f $(DESTDIR)$(XPBS_LIB)/bin; \ + done + + DFLT_ACTION = $(CC) $(CFLAGS) $@.o -o $@ $(LIBRARIES) +diff -urN torque-2.0.0p2.orig/src/gui/Makefile.in torque-2.0.0p2/src/gui/Makefile.in +--- torque-2.0.0p2.orig/src/gui/Makefile.in 2005-11-09 18:30:12.000000000 +0100 ++++ torque-2.0.0p2/src/gui/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -133,34 +133,34 @@ + @MAKE_POSIX_PLUS@@echo Making in Ccode for xpbs; cd Ccode; $(MAKE) all + + install: build +- test -d $(XPBS_LIB) || $(INSTALL) -m 755 -d $(XPBS_LIB) +- test -d $(XPBS_LIB)/bitmaps || $(INSTALL) -m 755 -d $(XPBS_LIB)/bitmaps +- test -d $(XPBS_LIB)/help || $(INSTALL) -m 755 -d $(XPBS_LIB)/help ++ test -d $(DESTDIR)$(XPBS_LIB) || $(INSTALL) -m 755 -d $(DESTDIR)$(XPBS_LIB) ++ test -d $(DESTDIR)$(XPBS_LIB)/bitmaps || $(INSTALL) -m 755 -d $(DESTDIR)$(XPBS_LIB)/bitmaps ++ test -d $(DESTDIR)$(XPBS_LIB)/help || $(INSTALL) -m 755 -d $(DESTDIR)$(XPBS_LIB)/help + # + for f in $(srcdir)/bitmaps/*; do \ +- test -f $$f && $(INSTALL) -m 644 $$f $(XPBS_LIB)/bitmaps; \ ++ test -f $$f && $(INSTALL) -m 644 $$f $(DESTDIR)$(XPBS_LIB)/bitmaps; \ + done + # + for f in $(srcdir)/help/*.hlp; do \ +- $(INSTALL) -m 644 $$f $(XPBS_LIB)/help; \ ++ $(INSTALL) -m 644 $$f $(DESTDIR)$(XPBS_LIB)/help; \ + done + # + @cd Ccode; $(MAKE) install + # + for f in $(srcdir)/*.tcl $(srcdir)/*.tk; do \ +- $(INSTALL) -m 644 $$f $(XPBS_LIB); \ ++ $(INSTALL) -m 644 $$f $(DESTDIR)$(XPBS_LIB); \ + done + # + # install xpbs changing the location of libdir and appdefdir + # + @echo Install xpbs +- $(INSTALL) -m 755 xpbs $(bindir)/xpbs ++ $(INSTALL) -m 755 xpbs $(DESTDIR)$(bindir)/xpbs + @chmod 755 $(bindir)/xpbs 2> /dev/null + # +- $(INSTALL) -m 755 buildindex $(XPBS_LIB) +- $(INSTALL) -m 644 xpbsrc $(XPBS_LIB) ++ $(INSTALL) -m 755 buildindex $(DESTDIR)$(XPBS_LIB) ++ $(INSTALL) -m 644 xpbsrc $(DESTDIR)$(XPBS_LIB) + # +- cd $(XPBS_LIB) && ./buildindex $(XPBS_LIB) && chmod 644 tclIndex ++ cd $(DESTDIR)$(XPBS_LIB) && ./buildindex $(DESTDIR)$(XPBS_LIB) && chmod 644 tclIndex + + + distclean clean:: +diff -urN torque-2.0.0p2.orig/src/iff/Makefile.in torque-2.0.0p2/src/iff/Makefile.in +--- torque-2.0.0p2.orig/src/iff/Makefile.in 2005-11-09 18:30:16.000000000 +0100 ++++ torque-2.0.0p2/src/iff/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -110,8 +110,8 @@ + build: $(TARGET) + + install: $(TARGET) +- @$(INSTALL) -d -m 755 $(sbindir) && \ +- $(INSTALL) -m 4755 $(TARGET) $(sbindir) ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) && \ ++ $(INSTALL) -m 4755 $(TARGET) $(DESTDIR)$(sbindir) + + pbs_iff: $(OBJS) $(PBS_LIBS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(PBS_LIBS) $(LIBS) +diff -urN torque-2.0.0p2.orig/src/include/Makefile.in torque-2.0.0p2/src/include/Makefile.in +--- torque-2.0.0p2.orig/src/include/Makefile.in 2005-11-09 18:30:14.000000000 +0100 ++++ torque-2.0.0p2/src/include/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -146,9 +146,9 @@ + + + install: +- @$(INSTALL) -d -m 755 $(includedir) && \ ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(includedir) && \ + for f in $(USERH); do \ +- $(INSTALL) -m 444 $$f $(includedir); \ ++ $(INSTALL) -m 444 $$f $(DESTDIR)$(includedir); \ + done + + clean:: +diff -urN torque-2.0.0p2.orig/src/mom_rcp/Makefile.in torque-2.0.0p2/src/mom_rcp/Makefile.in +--- torque-2.0.0p2.orig/src/mom_rcp/Makefile.in 2005-11-09 18:30:17.000000000 +0100 ++++ torque-2.0.0p2/src/mom_rcp/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -111,8 +111,8 @@ + build: $(TARGET) + + install: $(TARGET) +- $(INSTALL) -d $(sbindir) +- $(INSTALL) -m 4755 $(TARGET) $(sbindir) ++ $(INSTALL) -d $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 4755 $(TARGET) $(DESTDIR)$(sbindir) + + $(TARGET): $(OBJS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) +diff -urN torque-2.0.0p2.orig/src/resmom/Makefile.in torque-2.0.0p2/src/resmom/Makefile.in +--- torque-2.0.0p2.orig/src/resmom/Makefile.in 2005-11-09 18:30:10.000000000 +0100 ++++ torque-2.0.0p2/src/resmom/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -142,8 +142,8 @@ + install: build + $(PBS_MKDIRS) mom + $(PBS_MKDIRS) aux +- @$(INSTALL) -d -m 755 $(sbindir) && \ +- $(INSTALL) -m 700 $(TARGET) $(sbindir) ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) && \ ++ $(INSTALL) -m 700 $(TARGET) $(DESTDIR)$(sbindir) + + pbs_mom: $(OBJS) $(PBSLIBS) + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(PBSLIBS) $(LIBS) $(MOMLIBS) +diff -urN torque-2.0.0p2.orig/src/scheduler.basl/Makefile.in torque-2.0.0p2/src/scheduler.basl/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.basl/Makefile.in 2005-11-09 18:30:20.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.basl/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -124,10 +124,10 @@ + build: $(TARGETS) + + install: build +- $(INSTALL) -d -m 755 $(bindir) && \ +- $(INSTALL) -m 755 basl2c $(bindir) ; \ +- $(INSTALL) -d -m 755 $(sbindir) && \ +- $(INSTALL) -m 700 pbs_sched $(sbindir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) && \ ++ $(INSTALL) -m 755 basl2c $(DESTDIR)$(bindir) ; \ ++ $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) && \ ++ $(INSTALL) -m 700 pbs_sched $(DESTDIR)$(sbindir) + + basl2c: $(OBJS_COMMON) $(OBJS_COMP) + $(CC) $(CFLAGS) -o $@ $(OBJS_COMMON) $(OBJS_COMP) $(LIBRARIES) +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/Makefile.in torque-2.0.0p2/src/scheduler.cc/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/Makefile.in 2005-11-09 18:30:17.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -123,8 +123,8 @@ + + install: build + @MAKE_POSIX_PLUS@@cd $(SCHD_BUILD) && $(MAKE) install +- @$(INSTALL) -d -m 755 $(sbindir) && \ +- $(INSTALL) -m 700 $(TARGET) $(sbindir) ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) && \ ++ $(INSTALL) -m 700 $(TARGET) $(DESTDIR)$(sbindir) + + $(TARGET): $(OBJS) $(SCHEDLIB) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(SCHEDLIB) $(PBSLIBS) $(LIBS) +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/samples/cray_t3e/Makefile.in torque-2.0.0p2/src/scheduler.cc/samples/cray_t3e/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/samples/cray_t3e/Makefile.in 2005-11-09 18:30:17.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/samples/cray_t3e/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -161,11 +161,11 @@ + + install:: $(TARGET) + @# a two step process is best to work around broken installs +- $(INSTALL) -d $(libdir) && \ +- $(INSTALL) -m 644 $(TARGET) $(libdir)/$(TARGET) ++ $(INSTALL) -d $(DESTDIR)$(libdir) && \ ++ $(INSTALL) -m 644 $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + @for f in $(SCHD_CONFIGS); do \ +- test -f $(PBS_SERVER_HOME)/sched_priv/$$f || \ +- $(INSTALL) -m 644 $(srcdir)/$$f $(PBS_SERVER_HOME)/sched_priv; \ ++ test -f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv/$$f || \ ++ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv; \ + done + + @mk_cleanup@ +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/samples/dec_cluster/Makefile.in torque-2.0.0p2/src/scheduler.cc/samples/dec_cluster/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/samples/dec_cluster/Makefile.in 2005-11-09 18:30:18.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/samples/dec_cluster/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -109,8 +109,8 @@ + install:: + @echo Installing scheduler config file + @for f in $(SCHD_CONFIG); do \ +- test -f $(PBS_SERVER_HOME)/sched_priv/$$f || \ +- $(INSTALL) -m 644 $(srcdir)/$$f $(PBS_SERVER_HOME)/sched_priv; \ ++ test -f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv/$$f || \ ++ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv; \ + done + + @mk_cleanup@ +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/samples/fifo/Makefile.in torque-2.0.0p2/src/scheduler.cc/samples/fifo/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/samples/fifo/Makefile.in 2005-11-09 18:30:17.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/samples/fifo/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -110,8 +110,8 @@ + install:: + @echo Installing other scheduler config files + @for f in $(SCHD_CONFIGS); do \ +- test -f $(PBS_SERVER_HOME)/sched_priv/$$f || \ +- $(INSTALL) -m 644 $(srcdir)/$$f $(PBS_SERVER_HOME)/sched_priv; \ ++ test -f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv/$$f || \ ++ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv; \ + done + + @mk_cleanup@ +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/samples/msic_cluster/Makefile.in torque-2.0.0p2/src/scheduler.cc/samples/msic_cluster/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/samples/msic_cluster/Makefile.in 2005-11-09 18:30:19.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/samples/msic_cluster/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -130,8 +130,8 @@ + install:: + @echo Installing scheduler config file + @for f in $(SCHD_CONFIG); do \ +- test -f $(PBS_SERVER_HOME)/sched_priv/$$f || \ +- $(INSTALL) -m 644 $(srcdir)/$$f $(PBS_SERVER_HOME)/sched_priv; \ ++ test -f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv/$$f || \ ++ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv; \ + done + + @mk_cleanup@ +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/samples/sgi_origin/Makefile.in torque-2.0.0p2/src/scheduler.cc/samples/sgi_origin/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/samples/sgi_origin/Makefile.in 2005-11-09 18:30:19.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/samples/sgi_origin/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -165,11 +165,11 @@ + + install:: $(TARGET) + @# a two step process is best to work around broken installs +- $(INSTALL) -d $(libdir) && \ +- $(INSTALL) -m 644 $(TARGET) $(libdir)/$(TARGET) ++ $(INSTALL) -d $(DESTDIR)$(libdir) && \ ++ $(INSTALL) -m 644 $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + @for f in $(SCHD_CONFIGS); do \ +- test -f $(PBS_SERVER_HOME)/sched_priv/$$f || \ +- $(INSTALL) -m 644 $(srcdir)/$$f $(PBS_SERVER_HOME)/sched_priv; \ ++ test -f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv/$$f || \ ++ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv; \ + done + + @mk_cleanup@ +diff -urN torque-2.0.0p2.orig/src/scheduler.cc/samples/umn_cluster/Makefile.in torque-2.0.0p2/src/scheduler.cc/samples/umn_cluster/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.cc/samples/umn_cluster/Makefile.in 2005-11-09 18:30:18.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.cc/samples/umn_cluster/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -120,8 +120,8 @@ + install:: + @echo Installing scheduler config file + @for f in $(SCHD_CONFIG); do \ +- test -f $(PBS_SERVER_HOME)/sched_priv/$$f || \ +- $(INSTALL) -m 644 $(srcdir)/$$f $(PBS_SERVER_HOME)/sched_priv; \ ++ test -f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv/$$f || \ ++ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(PBS_SERVER_HOME)/sched_priv; \ + done + + qschedule: +diff -urN torque-2.0.0p2.orig/src/scheduler.tcl/Makefile.in torque-2.0.0p2/src/scheduler.tcl/Makefile.in +--- torque-2.0.0p2.orig/src/scheduler.tcl/Makefile.in 2005-11-09 18:30:11.000000000 +0100 ++++ torque-2.0.0p2/src/scheduler.tcl/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -115,8 +115,8 @@ + + + install: build +- @$(INSTALL) -d -m 755 $(sbindir) && \ +- $(INSTALL) -m 700 $(TARGET) $(sbindir) ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) && \ ++ $(INSTALL) -m 700 $(TARGET) $(DESTDIR)$(sbindir) + + $(TARGET): $(OBJS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBRARIES) +diff -urN torque-2.0.0p2.orig/src/server/Makefile.in torque-2.0.0p2/src/server/Makefile.in +--- torque-2.0.0p2.orig/src/server/Makefile.in 2005-11-09 18:30:21.000000000 +0100 ++++ torque-2.0.0p2/src/server/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -168,8 +168,8 @@ + install: build + $(PBS_MKDIRS) server + $(PBS_MKDIRS) aux +- @$(INSTALL) -d -m 755 $(sbindir) && \ +- $(INSTALL) -m 700 $(TARGET) $(sbindir) ++ @$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) && \ ++ $(INSTALL) -m 700 $(TARGET) $(DESTDIR)$(sbindir) + + pbs_server: $(OBJS) $(PBSLIBS) + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(PBSLIBS) $(LIBS) +diff -urN torque-2.0.0p2.orig/src/tools/Makefile.in torque-2.0.0p2/src/tools/Makefile.in +--- torque-2.0.0p2.orig/src/tools/Makefile.in 2005-11-09 18:30:11.000000000 +0100 ++++ torque-2.0.0p2/src/tools/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -130,9 +130,9 @@ + build: $(TARGETS) + + install: build +- test -d $(bindir) || $(INSTALL) -m 755 -d $(bindir) ++ test -d $(bindir) || $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) + for f in $(TARGETS); do \ +- $(INSTALL) -m 755 $$f $(bindir); \ ++ $(INSTALL) -m 755 $$f $(DESTDIR)$(bindir); \ + done + @MAKE_POSIX_PLUS@@if test -n "$(TK_VER)"; then { cd xpbsmon && $(MAKE) install;} ; fi + +diff -urN torque-2.0.0p2.orig/src/tools/xpbsmon/Makefile.in torque-2.0.0p2/src/tools/xpbsmon/Makefile.in +--- torque-2.0.0p2.orig/src/tools/xpbsmon/Makefile.in 2005-11-09 18:30:11.000000000 +0100 ++++ torque-2.0.0p2/src/tools/xpbsmon/Makefile.in 2005-12-11 02:51:06.000000000 +0100 +@@ -129,33 +129,33 @@ + + + install: build +- test -d $(XPBSMON_LIB) || $(INSTALL) -m 755 -d $(XPBSMON_LIB) +- test -d $(XPBSMON_LIB)/bitmaps || \ +- $(INSTALL) -m 755 -d $(XPBSMON_LIB)/bitmaps +- test -d $(XPBSMON_LIB)/help || \ +- $(INSTALL) -m 755 -d $(XPBSMON_LIB)/help ++ test -d $(DESTDIR)$(XPBSMON_LIB) || $(INSTALL) -m 755 -d $(DESTDIR)$(XPBSMON_LIB) ++ test -d $(DESTDIR)$(XPBSMON_LIB)/bitmaps || \ ++ $(INSTALL) -m 755 -d $(DESTDIR)$(XPBSMON_LIB)/bitmaps ++ test -d $(DESTDIR)$(XPBSMON_LIB)/help || \ ++ $(INSTALL) -m 755 -d $(DESTDIR)$(XPBSMON_LIB)/help + # + for f in $(srcdir)/bitmaps/*; do \ +- test -f $$f && $(INSTALL) -m 644 $$f $(XPBSMON_LIB)/bitmaps; \ ++ test -f $$f && $(INSTALL) -m 644 $$f $(DESTDIR)$(XPBSMON_LIB)/bitmaps; \ + done + # + for f in $(srcdir)/help/*.hlp; do \ +- $(INSTALL) -m 644 $$f $(XPBSMON_LIB)/help; \ ++ $(INSTALL) -m 644 $$f $(DESTDIR)$(XPBSMON_LIB)/help; \ + done + # + for f in $(srcdir)/*.tcl $(srcdir)/*.tk; do \ +- $(INSTALL) -m 644 $$f $(XPBSMON_LIB); \ ++ $(INSTALL) -m 644 $$f $(DESTDIR)$(XPBSMON_LIB); \ + done + # + # install xpbsmon changing the location of pbs_tclsh and libdir + # +- $(INSTALL) -m 755 xpbsmon $(bindir)/xpbsmon +- chmod 755 $(bindir)/xpbsmon 2> /dev/null ++ $(INSTALL) -m 755 xpbsmon $(DESTDIR)$(bindir)/xpbsmon ++ chmod 755 $(DESTDIR)$(bindir)/xpbsmon 2> /dev/null + # +- $(INSTALL) -m 755 buildindex $(XPBSMON_LIB) +- $(INSTALL) -m 644 xpbsmonrc $(XPBSMON_LIB) ++ $(INSTALL) -m 755 buildindex $(DESTDIR)$(XPBSMON_LIB) ++ $(INSTALL) -m 644 xpbsmonrc $(DESTDIR)$(XPBSMON_LIB) + # +- cd $(XPBSMON_LIB) && ./buildindex $(XPBSMON_LIB) && chmod 644 tclIndex ++ cd $(DESTDIR)$(XPBSMON_LIB) && ./buildindex $(DESTDIR)$(XPBSMON_LIB) && chmod 644 tclIndex + + clean:: + $(RM) tclIndex; exit 0 + diff --git a/sys-cluster/torque/torque-2.0.0_p7.ebuild b/sys-cluster/torque/torque-2.0.0_p7.ebuild new file mode 100644 index 000000000..f4337cc8c --- /dev/null +++ b/sys-cluster/torque/torque-2.0.0_p7.ebuild @@ -0,0 +1,144 @@ +inherit flag-o-matic eutils + +MY_P="${P/_}" +echo $MY_P +DESCRIPTION="A freely downloadable cluster resource manager and queuing system based on OpenPBS" +HOMEPAGE="http://www.clusterresources.com/products/torque/" +SRC_URI="http://www.clusterresources.com/downloads/torque/${MY_P}.tar.gz" + +LICENSE="openpbs" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="tcltk X scp server doc" +PROVIDE="virtual/pbs" + +# ed is used by makedepend-sh +DEPEND_COMMON="virtual/libc + X? ( virtual/x11 dev-lang/tk ) + tcltk? ( dev-lang/tcl ) + !virtual/pbs" +DEPEND="${DEPEND_COMMON} + sys-apps/ed" +RDEPEND="${DEPEND_COMMON} + net-misc/openssh" +PDEPEND=">=sys-cluster/openpbs-common-1.1.0" + +S="${WORKDIR}/${MY_P}" + +SPOOL_LOCATION="/var/spool" # this needs to move to /var later on +PBS_SERVER_HOME="${SPOOL_LOCATION}/PBS/" + +src_unpack() { + unpack ${MY_P}.tar.gz + export EPATCH_OPTS="-p1 -d ${S}" + epatch ${FILESDIR}/${PN}-2.0.0_p5-respect-ldflags.patch || die "Failed to fix ldflags" + epatch ${FILESDIR}/${PN}-2.0.0_p7-respect-destdir.patch || die "Failed to fix Makefiles for DESTDIR" + epatch ${FILESDIR}/${PN}-2.0.0_p5-destdir-fixes.patch || die "Failed to fix DESTDIR for gui" + epatch ${FILESDIR}/${PN}-2.0.0_p5-setuid-safety.patch || die "Failed to fix setXid linking for pbs_rcp" + epatch ${FILESDIR}/${PN}-2.0.0_p5-makedepend.patch || die "Failed to fix buildutils/makedepend-sh" + +# Tries to use absolute /tmp/ for tempfiles which fails miserably. + sed -i -e "s|/tmp/|\${TMPDIR}/|g" ${S}/buildutils/makedepend-sh || die "Failed TMPDIR change" +} + +src_compile() { + local myconf +# use X || myconf="--disable-gui" +# use tcltk && myconf="${myconf} --with-tcl" + use doc && myconf="${myconf} --enable-docs" + append-flags -DJOB_DELETE_NANNY + + ./configure ${myconf} \ + $(use_enable X gui) \ + $(use_enable pbsserver server) \ + $(use_with tcltk tcl) \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --libdir="\${exec_prefix}/$(get_libdir)/pbs" \ + --enable-mom \ + --enable-clients \ + --enable-shared \ + --enable-depend-cache \ + $(use_with scp) \ + $(use_enable tcltk tcl-qstat) \ + --set-server-home=${PBS_SERVER_HOME} \ + --set-environ=/etc/pbs_environment || die "./configure failed" + + emake || die "emake failed" +} + +# WARNING +# OpenPBS is extremely stubborn about directory permissions. Sometimes it will +# just fall over with the error message, but in some spots it will just ignore +# you and fail strangely. Likewise it also barfs on our .keep files! +pbs_createspool() { + root="$1" + s="${SPOOL_LOCATION}" + h="${PBS_SERVER_HOME}" + sp="${h}/server_priv" + einfo "Building spool directory under ${D}${h}" + for a in \ + 0755:${s} 0755:${h} 0755:${h}/aux 0700:${h}/checkpoint \ + 0755:${h}/mom_logs 0751:${h}/mom_priv 0751:${h}/mom_priv/jobs \ + 0755:${h}/sched_logs 0750:${h}/sched_priv \ + 0755:${h}/server_logs \ + 0750:${h}/server_priv 0755:${h}/server_priv/accounting \ + 0750:${h}/server_priv/acl_groups 0750:${h}/server_priv/acl_hosts \ + 0750:${h}/server_priv/acl_svr 0750:${h}/server_priv/acl_users \ + 0750:${h}/server_priv/jobs 0750:${h}/server_priv/queues \ + 1777:${h}/spool 1777:${h}/undelivered ; + do + d="${a/*:}" + m="${a/:*}" + if [ ! -d "${root}${d}" ]; then + install -d -m${m} ${root}${d} + else + chmod ${m} ${root}${d} + fi + done +} + +src_install() { + # Make directories first + pbs_createspool "${D}" + + einfo "Running make install" + make DESTDIR=${D} install || die + + einfo "Doing docs & lib symlinks" + dodoc INSTALL PBS_License.txt README.torque Release_Notes + # Init scripts come from openpbs-common + #newinitd ${FILESDIR}/pbs-init.d pbs + #newconfd ${FILESDIR}/pbs-conf.d pbs + dosym /usr/$(get_libdir)/pbs/libpbs.a /usr/$(get_libdir)/libpbs.a + + einfo "Handling /etc/pbs_environment and /var/spool/PBS/server_name" + # this file MUST exist for PBS/Torque to work + # but try to preserve any customatizations that the user has made + dodir /etc + if [ -f ${ROOT}/etc/pbs_environment ]; then + cp ${ROOT}/etc/pbs_environment ${D}/etc/pbs_environment + else + touch ${D}/etc/pbs_environment + fi + + if [ -f "${ROOT}/var/spool/PBS/server_name" ]; then + cp "${ROOT}/var/spool/PBS/server_name" "${D}/var/spool/PBS/server_name" + fi + + # The build script isn't alternative install location friendly, + # So we have to fix some hard-coded paths in tclIndex for xpbs* to work + for file in `find ${D} -iname tclIndex` + do + sed -e "s/${D//\// }/ /" "${file}" > "${file}.new" + mv "${file}.new" "${file}" + done +} + +pkg_postinst() { + # make sure the damn directories exist + pbs_createspool "${ROOT}" + [ ! -f "${ROOT}/etc/pbs_environment" ] && touch "${ROOT}/etc/pbs_environment" +} + |