summaryrefslogtreecommitdiff
path: root/source/d/icecream
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/icecream')
-rwxr-xr-xsource/d/icecream/get-icecream.sh47
-rwxr-xr-xsource/d/icecream/icecream.SlackBuild2
-rw-r--r--source/d/icecream/rc.icecc-scheduler4
-rw-r--r--source/d/icecream/rc.iceccd4
-rw-r--r--source/d/icecream/rc.icecream.conf17
5 files changed, 69 insertions, 5 deletions
diff --git a/source/d/icecream/get-icecream.sh b/source/d/icecream/get-icecream.sh
new file mode 100755
index 00000000..b4642231
--- /dev/null
+++ b/source/d/icecream/get-icecream.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Pull a stable branch + patches
+BRANCH=${1:-master}
+
+# Clear download area:
+rm -rf icecream
+
+# Clone repository:
+git clone git://github.com/icecc/icecream
+
+# checkout $BRANCH:
+( cd icecream
+ git checkout $BRANCH || exit 1
+)
+
+HEADISAT="$( cd icecream && git log -1 --format=%h )"
+DATE="$( cd icecream && git log -1 --format=%ad --date=format:%Y%m%d )"
+# Cleanup. We're not packing up the whole git repo.
+( cd icecream && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
+mv icecream icecream-${DATE}_${HEADISAT}
+tar cf icecream-${DATE}_${HEADISAT}.tar icecream-${DATE}_${HEADISAT}
+plzip -9 -f icecream-${DATE}_${HEADISAT}.tar
+rm -rf icecream-${DATE}_${HEADISAT}
+echo
+echo "icecream branch $BRANCH with HEAD at $HEADISAT packaged as icecream-${DATE}_${HEADISAT}.tar.lz"
+echo
diff --git a/source/d/icecream/icecream.SlackBuild b/source/d/icecream/icecream.SlackBuild
index f3c25d73..fb724565 100755
--- a/source/d/icecream/icecream.SlackBuild
+++ b/source/d/icecream/icecream.SlackBuild
@@ -61,7 +61,7 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
-NUMJOBS=${NUMJOBS:-" -j7 "}
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
diff --git a/source/d/icecream/rc.icecc-scheduler b/source/d/icecream/rc.icecc-scheduler
index b407f26e..e04be108 100644
--- a/source/d/icecream/rc.icecc-scheduler
+++ b/source/d/icecream/rc.icecc-scheduler
@@ -10,8 +10,8 @@
# Start scheduler:
scheduler_start() {
if [ -x /usr/sbin/icecc-scheduler ]; then
- echo "Starting distributed compiler scheduler: /usr/sbin/icecc-scheduler $ICECC_SCHEDULER_OPTIONS"
- /usr/sbin/icecc-scheduler $ICECC_SCHEDULER_OPTIONS
+ echo "Starting distributed compiler scheduler: /usr/sbin/icecc-scheduler $ICECC_SCHEDULER_OPTIONS $ICECC_SCHEDULER_EXTRA_OPTIONS"
+ /usr/sbin/icecc-scheduler $ICECC_SCHEDULER_OPTIONS $ICECC_SCHEDULER_EXTRA_OPTIONS
fi
}
diff --git a/source/d/icecream/rc.iceccd b/source/d/icecream/rc.iceccd
index 93b4d170..f2b6f82c 100644
--- a/source/d/icecream/rc.iceccd
+++ b/source/d/icecream/rc.iceccd
@@ -10,8 +10,8 @@
# Start iceccd:
iceccd_start() {
if [ -x /usr/sbin/iceccd ]; then
- echo "Starting distributed compiler daemon: /usr/sbin/iceccd $ICECCD_OPTIONS"
- /usr/sbin/iceccd $ICECCD_OPTIONS
+ echo "Starting distributed compiler daemon: /usr/sbin/iceccd $ICECCD_OPTIONS $ICECCD_JOBS $ICECCD_NICENESS $ICECCD_EXTRA_OPTIONS"
+ /usr/sbin/iceccd $ICECCD_OPTIONS $ICECCD_JOBS $ICECCD_NICENESS $ICECCD_EXTRA_OPTIONS
fi
}
diff --git a/source/d/icecream/rc.icecream.conf b/source/d/icecream/rc.icecream.conf
index ce91ce65..d0bfaadf 100644
--- a/source/d/icecream/rc.icecream.conf
+++ b/source/d/icecream/rc.icecream.conf
@@ -10,6 +10,23 @@ ICECC_NETWORK=$(hostname -d)
# Defines the options passed to icecc-scheduler:
ICECC_SCHEDULER_OPTIONS="-n $ICECC_NETWORK -d -l /var/log/icecream/icecc-scheduler.log"
+# This is for adding any other custom options to icecc-scheduler.
+# See "man icecc-scheduler" for available options.
+ICECC_SCHEDULER_EXTRA_OPTIONS=""
+
# Defines the options passed to iceccd:
ICECCD_OPTIONS="-n $ICECC_NETWORK -d -b /var/cache/icecream -l /var/log/icecream/iceccd.log"
+# Maximum number of compile jobs started in parallel on machine running the
+# daemon. The default set below is the number of threads the CPU can handle,
+# plus one.
+ICECCD_JOBS="-m $(expr $(nproc) + 1)"
+
+# The level of niceness to use. Default is 5.
+# Lower values increase iceccd performance.
+#ICECCD_NICENESS="--nice 5"
+
+# This is for adding any other custom options to iceccd.
+# See "man iceccd" for available options.
+ICECCD_EXTRA_OPTIONS=""
+