minor changes
authorMichael Imhof <tantive@gentoo.org>
Mon, 4 Nov 2002 19:40:53 +0000 (19:40 +0000)
committerMichael Imhof <tantive@gentoo.org>
Mon, 4 Nov 2002 19:40:53 +0000 (19:40 +0000)
sys-cluster/openpbs/files/makedepend-sh-gcc3.patch [new file with mode: 0644]
sys-cluster/openpbs/files/pbs.rc [new file with mode: 0644]
sys-cluster/openpbs/openpbs-2.3.16.ebuild [new file with mode: 0644]

diff --git a/sys-cluster/openpbs/files/makedepend-sh-gcc3.patch b/sys-cluster/openpbs/files/makedepend-sh-gcc3.patch
new file mode 100644 (file)
index 0000000..5988eac
--- /dev/null
@@ -0,0 +1,11 @@
+--- buildutils/makedepend-sh   1999-11-17 17:32:52.000000000 +0000
++++ buildutils/makedepend-sh.patched   2002-10-31 07:34:58.000000000 +0000
+@@ -574,7 +574,7 @@
+                 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" | \
++                  sed -n -e "s;^\# [0-9][0-9 ]*\"\(/.*\)\";$f: \1;p" | \
+                   grep -v "$s\$" | \
+                   sed -e 's;\([^ :]*: [^ ]*\).*;\1;' \
+                   >> $TMP
diff --git a/sys-cluster/openpbs/files/pbs.rc b/sys-cluster/openpbs/files/pbs.rc
new file mode 100644 (file)
index 0000000..57f3437
--- /dev/null
@@ -0,0 +1,85 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openpbs/files/pbs.rc,v 1.1 2002/11/04 19:40:53 tantive Exp $
+
+depend() {
+       need net
+}
+
+checkconfig() {
+
+       HOSTNAME=`hostname`
+
+       if [ ! -e /var/spool/PBS/server_name ] ; then
+               eerror "Missing config file /var/spool/PBS/server_name"
+               return 1
+       else
+               PBS_SERVER_NAME=`cat /var/spool/PBS/server_name`
+               if [ ${HOSTNAME} == ${PBS_SERVER_NAME} ] ; then
+                       PBS_START_SERVER=1;
+               else
+                       PBS_START_SERVER=0;
+               fi
+       fi
+
+       if [ ! -e /var/spool/PBS/mom_priv/config ] ; then
+               eerror "Missing config file /var/spool/PBS/mom_priv/config"
+               return 1
+       else
+               PBS_START_MOM=1;
+       fi
+
+       if [ "${PBS_START_SERVER}" -eq 1 ] ; then
+               if [ ! -e /var/spool/PBS/server_priv/nodes ] ; then
+                       eerror "The startup script has detected this node is a server"
+                       eerror "from the file /var/spool/PBS/server_name,"
+                       eerror "but the config file /var/spool/PBS/server_priv/nodes is missing"
+                       return 1
+               fi
+       fi
+
+}
+
+start() {
+       checkconfig || return 1
+
+       if [ "${PBS_START_MOM}" -gt 0 ] ; then
+               ebegin "Starting pbs_mom"
+               start-stop-daemon --start --pidfile /var/spool/PBS/mom_priv/mom.lock \
+                       --startas /usr/sbin/pbs_mom
+       fi
+
+       if [ "${PBS_START_SERVER}" -gt 0 ] ; then
+               ebegin "Starting pbs_server"
+               start-stop-daemon --start --quiet --pidfile /var/spool/PBS/server_priv/server.lock \
+                       --startas /usr/sbin/pbs_server
+               ebegin "Starting pbs_sched"
+               start-stop-daemon --start --quiet --pidfile /var/run/pbs_sched.pid \
+                       --startas /usr/sbin/pbs_sched
+       fi
+
+       eend $?
+}
+
+stop() {
+       if [ -e /var/spool/PBS/mom_priv/mom.lock ] ; then
+               ebegin "Stopping pbs_mom"
+               start-stop-daemon --stop --pidfile /var/spool/PBS/mom_priv/mom.lock
+               rm -f /var/spool/PBS/mom_priv/mom.lock
+       fi
+
+       if [ -e /var/spool/PBS/server_priv/server.lock ] ; then
+               ebegin "Stopping pbs_server"
+               start-stop-daemon --stop --pidfile /var/spool/PBS/server_priv/server.lock
+               rm -f /var/spool/PBS/server_priv/server.lock
+       fi
+
+       if [ -e /var/spool/PBS/sched_priv/sched.lock ] ; then
+               ebegin "Stopping pbs_sched"
+               start-stop-daemon --stop --pidfile /var/spool/PBS/sched_priv/sched.lock
+               rm -f /var/spool/PBS/sched_priv/sched.lock
+       fi
+
+       eend $?
+}
diff --git a/sys-cluster/openpbs/openpbs-2.3.16.ebuild b/sys-cluster/openpbs/openpbs-2.3.16.ebuild
new file mode 100644 (file)
index 0000000..e483fef
--- /dev/null
@@ -0,0 +1,79 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openpbs/openpbs-2.3.16.ebuild,v 1.1 2002/11/04 19:40:53 tantive Exp $
+
+NAME=`echo ${P} | sed -e "s|openpbs-|OpenPBS_|; y|.|_|"`
+A=${NAME}.tar.gz
+S="${WORKDIR}/${NAME}"
+
+DESCRIPTION="The Portable Batch System (PBS) is a flexible batch queueing and workload management system"
+HOMEPAGE="http://www.openpbs.org/"
+LICENSE="as-is"
+
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="X tcltk"
+
+DEPEND="virtual/glibc
+               X? ( x11-base/xfree )
+               tcltk? ( dev-lang/tcl )"
+RDEPEND="net-misc/openssh"
+
+
+src_unpack() {
+        if [ ! -e ${DISTDIR}/${A} ] ; then
+                einfo "Due to license issues you have to download"
+                einfo "the appropriate openpbs archive:"
+               einfo "http://www.openpbs.org/UserArea/Download/"${A}
+               einfo ""
+                einfo "The archive should be placed into /usr/portage/distfiles."
+
+                die "package archive not found"
+        fi
+
+       cd ${WORKDIR}
+       unpack ${A}
+       cd ${S}
+       # apply a patch I made for gcc3. 
+       # maybe this should be done with sed but I'm too lazy
+       patch -p0 < ${FILESDIR}/makedepend-sh-gcc3.patch
+
+       # this thing doesn't use make install, but rather it's own install script
+       # fix it here so the install dirs are set to the ${D} directory
+       cd buildutils
+       mv pbs_mkdirs.in pbs_mkdirs.in-orig
+       sed -e "s|prefix=@prefix@|prefix=\${D}@prefix@| ; \
+                       s|PBS_SERVER_HOME=@PBS_SERVER_HOME@|PBS_SERVER_HOME=\${D}@PBS_SERVER_HOME@| ; \
+                       s|PBS_DEFAULT_FILE=@PBS_DEFAULT_FILE@|PBS_DEFAULT_FILE=\${D}@PBS_DEFAULT_FILE@| ; \
+                       s|PBS_ENVIRON=@PBS_ENVIRON@|PBS_ENVIRON=\${D}@PBS_ENVIRON@|" \
+                       pbs_mkdirs.in-orig > pbs_mkdirs.in
+}
+
+src_compile() {
+       local myconf
+       use X || myconf="--disable-gui"
+       use tcltk && myconf="${myconf} --with-tcl"
+
+       ./configure ${myconf} \
+               --prefix=/usr \
+               --mandir=/usr/share/man \
+               --enable-docs \
+               --enable-server \
+               --enable-mom \
+               --enable-clients \
+               --set-server-home=/var/spool/PBS \
+               --set-environ=/etc/pbs_environment \
+               --with-scp || die "./configure failed"
+
+       make || die
+}
+
+src_install() {
+
+       make prefix=${D}/usr \
+               mandir=${D}/usr/share/man \
+               PBS_SERVER_HOME=${D}/var/spool/PBS \
+               install || die
+
+       dodoc INSTALL PBS_License.text Read.Me Release_Notes
+}