development/icecream: Added to 13.0 repository

This commit is contained in:
Heinz Wiesinger 2010-05-13 00:57:55 +02:00 committed by Robby Workman
parent b32ef8faab
commit 50d2a8aa6e
14 changed files with 286 additions and 0 deletions

View file

@ -0,0 +1,14 @@
Icecream is a distributed compile system. It allows parallel compiling by
distributing the compile jobs to several nodes of a compile network running the
icecc daemon. The icecc scheduler routes the jobs and provides status and
statistics information to the icecc monitor. Each compile node can accept one
or more compile jobs depending on the number of processors and the settings of
the daemon. Link jobs and other jobs which cannot be distributed are executed
locally on the node where the compilation is started.
Note that upon installation of the resulting package, all your software
will be compiled by icecream by default.
For information on how to use icecream in combination with ccache see
http://en.opensuse.org/Icecream#How_to_combine_icecream_with_ccache
icecc can use librsync, which is also available from slackbuilds.org.

View file

@ -0,0 +1,30 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
# Keep same perms on rc.iceccd.new:
if [ -e etc/rc.d/rc.iceccd ]; then
cp -a etc/rc.d/rc.iceccd etc/rc.d/rc.iceccd.new.incoming
cat etc/rc.d/rc.iceccd.new > etc/rc.d/rc.iceccd.new.incoming
mv etc/rc.d/rc.iceccd.new.incoming etc/rc.d/rc.iceccd.new
fi
# Keep same perms on rc.icecc-scheduler.new:
if [ -e etc/rc.d/rc.icecc-scheduler ]; then
cp -a etc/rc.d/rc.icecc-scheduler etc/rc.d/rc.icecc-scheduler.new.incoming
cat etc/rc.d/rc.icecc-scheduler.new > etc/rc.d/rc.icecc-scheduler.new.incoming
mv etc/rc.d/rc.icecc-scheduler.new.incoming etc/rc.d/rc.icecc-scheduler.new
fi
config etc/rc.d/rc.iceccd.new
config etc/rc.d/rc.icecream.conf.new
config etc/rc.d/rc.icecc-scheduler.new

View file

@ -0,0 +1,103 @@
#!/bin/sh
# Slackware build script for icecream
# Copyright 2009 Heinz Wiesinger <pprkut@liwjatan.at>
# 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.
PRGNAM=icecream
SRCNAM=icecc
VERSION=0.9.4
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--disable-static \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
mkdir -p $PKG/etc/profile.d/
cp $CWD/profile.d/* $PKG/etc/profile.d/
chmod 0755 $PKG/etc/profile.d/*
# Install init script
mkdir -p $PKG/etc/rc.d
install -m 0755 $CWD/rc.iceccd $PKG/etc/rc.d/rc.iceccd.new
install -m 0755 $CWD/rc.icecc-scheduler $PKG/etc/rc.d/rc.icecc-scheduler.new
install -m 0644 $CWD/rc.icecream.conf $PKG/etc/rc.d/rc.icecream.conf.new
mkdir -p $PKG/opt/icecream/bin
for i in g++ gcc cc c++ $ARCH-slackware-linux-c++ \
$ARCH-slackware-linux-g++ $ARCH-slackware-linux-gcc; do
ln -s /usr/bin/icecc $PKG/opt/icecream/bin/$i
rm -f $PKG/usr/bin/$i
done
mkdir -p $PKG/usr/man/{man1,man7}
cp $CWD/manpages/*.1.gz $PKG/usr/man/man1/
cp $CWD/manpages/*.7.gz $PKG/usr/man/man7/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,10 @@
PRGNAM="icecream"
VERSION="0.9.4"
HOMEPAGE="http://en.opensuse.org/Icecream"
DOWNLOAD="ftp://ftp.suse.com/pub/projects/icecream/icecc-0.9.4.tar.bz2"
MD5SUM="b52192df5aa3713910fdf481dda4119e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="pprkut"
EMAIL="pprkut@liwjatan.at"
APPROVED="rworkman"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,2 @@
#!/bin/csh
setenv PATH /opt/icecream/bin:${PATH}

View file

@ -0,0 +1,2 @@
#!/bin/sh
export PATH=/opt/icecream/bin:$PATH

View file

@ -0,0 +1,49 @@
#!/bin/sh
# Start/stop/restart scheduler.
# $Id: rc.scheduler,v 1.0 2009/04/18
# Author: Heinz Wiesinger <pprkut@liwjatan.at>
# ---------------------------------------------------------------------------
PID=$(/sbin/pidof -o %PPID scheduler)
# Get the configuration information from /etc/rc.d/rc.icecream.conf:
. /etc/rc.d/rc.icecream.conf
# Start scheduler:
scheduler_start() {
if [ -n "$PID" ]; then
echo "Distributed compiler scheduler already running"
exit
fi
if [ -x /usr/sbin/scheduler ]; then
echo "Starting distributed compiler scheduler: /usr/sbin/scheduler "
/usr/sbin/scheduler -n $NETWORK -d
fi
}
# Stop scheduler:
scheduler_stop() {
echo "Stopping distributed compiler scheduler"
killall scheduler 1> /dev/null 2> /dev/null
}
# Restart scheduler:
scheduler_restart() {
scheduler_stop
sleep 1
scheduler_start
}
case "$1" in
'start')
scheduler_start
;;
'stop')
scheduler_stop
;;
'restart')
scheduler_restart
;;
*)
echo "usage $0 start|stop|restart"
esac

View file

@ -0,0 +1,49 @@
#!/bin/sh
# Start/stop/restart iceccd.
# $Id: rc.iceccd,v 1.0 2009/04/18
# Author: Heinz Wiesinger <pprkut@liwjatan.at>
# ---------------------------------------------------------------------------
PID=$(/sbin/pidof -o %PPID iceccd)
# Get the configuration information from /etc/rc.d/rc.icecream.conf:
. /etc/rc.d/rc.icecream.conf
# Start iceccd:
iceccd_start() {
if [ -n "$PID" ]; then
echo "Distributed compiler daemon already running"
exit
fi
if [ -x /usr/sbin/iceccd ]; then
echo "Starting distributed compiler daemon: /usr/sbin/iceccd "
/usr/sbin/iceccd -n $NETWORK -d
fi
}
# Stop iceccd:
iceccd_stop() {
echo "Stopping distributed compiler daemon"
killall iceccd 1> /dev/null 2> /dev/null
}
# Restart iceccd:
iceccd_restart() {
iceccd_stop
sleep 1
iceccd_start
}
case "$1" in
'start')
iceccd_start
;;
'stop')
iceccd_stop
;;
'restart')
iceccd_restart
;;
*)
echo "usage $0 start|stop|restart"
esac

View file

@ -0,0 +1,8 @@
# /etc/rc.d/rc.icecream.conf
#
# This file contains the configuration settings for both iceccd and scheduler
# Defines the network name used to determine which nodes can be used for
# the compile processes. That way you can have several icecream clusters
# in the same network
NETWORK=$(hostname -d)

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler----------------------------------------------------|
icecream: icecream (network-distributed compilation)
icecream:
icecream: Icecream is a distributed compile system. It allows parallel
icecream: compiling by distributing the compile jobs to several nodes of a
icecream: compile network running the statistics information to the icecc
icecream: monitor. Each compile node can accept one or more compile jobs
icecream: depending on the number of processors and the settings of icecc
icecream: daemon. The icecc scheduler routes the jobs and provides status
icecream: and the daemon. Link jobs and other jobs which cannot be
icecream: distributed are executed locally on the node where the compilation
icecream: is started.