summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/torque/PKGBUILD60
-rw-r--r--pcr/torque/torque-node.service12
-rw-r--r--pcr/torque/torque-scheduler.service12
-rw-r--r--pcr/torque/torque-server.service12
-rw-r--r--pcr/torque/torque.install9
5 files changed, 105 insertions, 0 deletions
diff --git a/pcr/torque/PKGBUILD b/pcr/torque/PKGBUILD
new file mode 100644
index 000000000..7ed85c1d8
--- /dev/null
+++ b/pcr/torque/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+
+pkgname=torque
+pkgver=4.2.2
+_pkgver=1065
+pkgrel=1
+pkgdesc='An open source resource manager providing control over batch jobs and distributed compute nodes.'
+url=http://www.adaptivecomputing.com/products/open-source/$pkgname/
+arch=(
+ i686
+ x86_64
+ mips64el
+)
+license=custom
+depends=(
+ libxml2
+ openssh
+)
+install=$pkgname.install
+options=(!libtool)
+backup=(
+ var/spool/$pkgname/mom_priv/config
+ var/spool/$pkgname/serv_priv/nodes
+ var/spool/$pkgname/serv_priv/serverdb
+ var/spool/$pkgname/server_name
+)
+source=(
+ $pkgname-$pkgver.tar.gz::http://www.adaptivecomputing.com/index.php?wpfb_dl=$_pkgver
+ $pkgname-{node,scheduler,server}.service
+)
+sha512sums=(
+ d53af8dc05e2d1ffa699da2a79e2c82247a882d868784c38d685fc77c3bb8a334e036e835bac2988d39675c5df7a04c2b567b826df4bf6975b437a9955164ae2
+ 532c007cf3fcf171d071b67438fca430cdda4ec19d5e6c51ff5388b73610817825dd4cc86866c3d8a9411b6fdee6f76c64cd764dbd2277c1e7ca48e843ff9221
+ 290620b00b2bd636b47c3c60158a4e6cff06e9a764ac7fc7d4996f9be1aace58ee248a075b4c3cf84951af9013a655b29ea6adec789fe6e170df62b07b05cc85
+ 2977fbd4d7b7241a2aadef4bc5575483a882a62dd65b74cfb26958530ce99030ee0c3e6c8a093d1e2ccc2bfe4ebed4f90bc7b52aaece7fd43ea2f9af08781fed
+)
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ setarch $CARCH ./configure --prefix=/usr\
+ --disable-gui\
+ --disable-gcc-warnings\
+ --mandir=/usr/share/man\
+ --with-default-server=localhost\
+ --with-rcp=scp\
+ --with-server-home=/var/spool/$pkgname\
+ --with-tcl=no
+ mv src/resmom/Makefile src/resmom/Makefile.old
+ cat src/resmom/Makefile.old | sed 's/$(MOMLIBS) $(PBS_LIBS)/$(PBS_LIBS) $(MOMLIBS)/g' > src/resmom/Makefile
+ setarch $CARCH make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ setarch $CARCH make DESTDIR=$pkgdir install
+ mkdir -p $pkgdir/etc/systemd/system
+ cp $srcdir/*.service $pkgdir/etc/systemd/system
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/torque/torque-node.service b/pcr/torque/torque-node.service
new file mode 100644
index 000000000..67edef4f5
--- /dev/null
+++ b/pcr/torque/torque-node.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=TORQUE node
+Wants=basic.target
+After=basic.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/spool/torque/mom_priv/mom.lock
+ExecStart=/usr/sbin/pbs_mom
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/torque/torque-scheduler.service b/pcr/torque/torque-scheduler.service
new file mode 100644
index 000000000..97ec6a093
--- /dev/null
+++ b/pcr/torque/torque-scheduler.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=TORQUE scheduler
+Wants=torque-server.service
+After=torque-server.service
+
+[Service]
+Type=forking
+PIDFile=/var/spool/torque/sched_priv/sched.lock
+ExecStart=/usr/sbin/pbs_sched
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/torque/torque-server.service b/pcr/torque/torque-server.service
new file mode 100644
index 000000000..80fcb1860
--- /dev/null
+++ b/pcr/torque/torque-server.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=TORQUE server
+Wants=basic.target
+After=basic.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/spool/torque/server_priv/server.lock
+ExecStart=/usr/sbin/pbs_server
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/torque/torque.install b/pcr/torque/torque.install
new file mode 100644
index 000000000..2e90bd1ba
--- /dev/null
+++ b/pcr/torque/torque.install
@@ -0,0 +1,9 @@
+post_install() {
+ pbs_server -f -t create
+ systemctl stop torque-server
+ echo 'Change the server name in /var/spool/torque/server_name to your needs.
+You may add your clients to /var/spool/torque/server_priv/nodes if your are the server.
+Enable torque-server.service or torque-node.service depending on whether you are the server or a node.'
+}
+
+# vim:set ts=2 sw=2 et: