development/icecream: Update build script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Heinz Wiesinger 2014-03-31 09:30:14 +07:00 committed by Willy Sudiarto Raharjo
parent 8f82185626
commit bd261da372
7 changed files with 34 additions and 16 deletions

View file

@ -9,6 +9,6 @@ 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://old-en.opensuse.org/Icecream#How_to_combine_icecream_with_ccache
https://github.com/icecc/icecream#how-to-combine-icecream-with-ccache
librsync is an optional dependency.

View file

@ -2,7 +2,7 @@
# Slackware build script for icecream
# Copyright 2009-2010 Heinz Wiesinger, Amsterdam, The Netherlands
# Copyright 2009-2014 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -25,7 +25,7 @@
PRGNAM=icecream
SRCNAM=icecc
VERSION=1.0.1
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -41,6 +41,18 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if ! grep ^icecream: /etc/group 2>&1 > /dev/null; then
echo " Must have a icecream group to run this script."
echo " # groupadd -g 282 icecream"
echo " Or something similar."
exit 1
elif ! grep ^icecream: /etc/passwd 2>&1 > /dev/null; then
echo " Must have a icecream user to run this script."
echo " # useradd -u 282 -g icecream -d /var/cache/icecream icecream"
echo " Or something similar."
exit 1
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@ -78,13 +90,15 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--enable-clang-rewrite-includes \
--enable-clang-wrappers \
--enable-shared \
--disable-static \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
rm -f $PKG/usr/lib$LIBDIRSUFFIX/*.a
mkdir -p $PKG/etc/profile.d/
cp $CWD/profile.d/* $PKG/etc/profile.d/
chmod 0755 $PKG/etc/profile.d/*
@ -95,13 +109,15 @@ 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
for i in $ARCH-slackware-linux-c++ $ARCH-slackware-linux-g++ \
$ARCH-slackware-linux-gcc $ARCH-slackware-linux-clang \
$ARCH-slackware-linux-clang++; do
ln -s /usr/bin/icecc $PKG/usr/libexec/icecc/bin/$i
done
mkdir -p $PKG/var/{cache,log}/icecream
chown icecream:icecream $PKG/var/{cache,log}/icecream
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,10 +1,10 @@
PRGNAM="icecream"
VERSION="1.0.1"
HOMEPAGE="http://old-en.opensuse.org/Icecream"
HOMEPAGE="https://github.com/icecc/icecream"
DOWNLOAD="ftp://ftp.suse.com/pub/projects/icecream/icecc-1.0.1.tar.bz2"
MD5SUM="638d8d3b102a964cadd5fd338fa73a95"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
REQUIRES="libcap-ng"
MAINTAINER="Heinz Wiesinger"
EMAIL="pprkut@liwjatan.at"

View file

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

View file

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

View file

@ -17,7 +17,8 @@ scheduler_start() {
fi
if [ -x /usr/sbin/icecc-scheduler ]; then
echo "Starting distributed compiler scheduler: /usr/sbin/icecc-scheduler "
/usr/sbin/icecc-scheduler -n $NETWORK -d
/usr/sbin/icecc-scheduler -n $NETWORK -d -u icecream \
-l /var/log/icecream/icecc-scheduler.log
fi
}

View file

@ -17,7 +17,8 @@ iceccd_start() {
fi
if [ -x /usr/sbin/iceccd ]; then
echo "Starting distributed compiler daemon: /usr/sbin/iceccd "
/usr/sbin/iceccd -n $NETWORK -d
/usr/sbin/iceccd -n $NETWORK -d -u icecream \
-l /var/log/icecream/iceccd.log
fi
}