]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
icecream: New package.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Feb 2011 13:45:39 +0000 (14:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Feb 2011 13:45:39 +0000 (14:45 +0100)
pkgs/core/icecream/icecream.nm [new file with mode: 0644]
pkgs/core/icecream/icecream.sh [new file with mode: 0644]
pkgs/core/icecream/patches/icecream-cleanup-conffile.patch0 [new file with mode: 0644]
pkgs/core/icecream/patches/icecream-rename-scheduler.patch [new file with mode: 0644]

diff --git a/pkgs/core/icecream/icecream.nm b/pkgs/core/icecream/icecream.nm
new file mode 100644 (file)
index 0000000..a66a6e7
--- /dev/null
@@ -0,0 +1,76 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt                 #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include $(PKGROOT)/Include
+
+# XXX man pages are missing
+# XXX initscripts for daemons are missing
+
+PKG_NAME       = icecream
+PKG_VER        = 0.9.6
+PKG_REL        = 1
+
+PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
+PKG_GROUP      = Development/Compilers
+PKG_URL        = http://en.opensuse.org/Icecream
+PKG_LICENSE    = GPLv2+
+PKG_SUMMARY    = Distributed compiler.
+
+PKG_DEPS      += gcc-c++
+PKG_BUILD_DEPS+= gcc-c++
+
+define PKG_DESCRIPTION
+       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.
+endef
+
+PKG_PACKAGES  += $(PKG_NAME)-devel
+
+DIR_APP        = $(DIR_SRC)/icecc-$(PKG_VER)
+PKG_TARBALL    = icecc-$(PKG_VER).tar.bz2
+
+CONFIGURE_OPTIONS += \
+       --disable-static \
+       --enable-shared
+
+define STAGE_INSTALL_CMDS
+       mkdir -pv $(BUILDROOT)/usr/lib/icecc/bin
+       for i in gcc g++ cc c++; do \
+               ln -svf ../../../bin/icecc $(BUILDROOT)/usr/lib/icecc/bin/$${i}; \
+               ln -svf ../../../bin/icecc $(BUILDROOT)/usr/lib/icecc/bin/$(DISTRO_MACHINE)-$${i}; \
+       done
+       sed -e 's|^#!.*|#!/bin/bash|' -i $(BUILDROOT)/usr/lib/icecc/icecc-create-env
+
+       -mkdir -pv $(BUILDROOT)/etc/profile.d
+       sed -e "s|@LIBDIR@|/usr/lib|g" \
+               < $(DIR_SOURCE)/icecream.sh > $(BUILDROOT)/etc/profile.d/icecream.sh
+
+       # create default working dir
+       -mkdir -pv $(BUILDROOT)/var/cache/icecream
+endef
diff --git a/pkgs/core/icecream/icecream.sh b/pkgs/core/icecream/icecream.sh
new file mode 100644 (file)
index 0000000..e8ab803
--- /dev/null
@@ -0,0 +1,10 @@
+# Leaves PATH unchanged if icecc is already there.
+# If ccache is there, adds icecc _after_ it.
+# Otherwise adds icecc to the beginning.
+
+PATH=`echo $PATH | /bin/sed -e \
+       '\%@LIBDIR@/icecc/bin% b
+       s%@LIBDIR@/ccache%&:@LIBDIR@/icecc/bin%
+       t
+       s%^%@LIBDIR@/icecc/bin:%'`
+
diff --git a/pkgs/core/icecream/patches/icecream-cleanup-conffile.patch0 b/pkgs/core/icecream/patches/icecream-cleanup-conffile.patch0
new file mode 100644 (file)
index 0000000..7bf7c9d
--- /dev/null
@@ -0,0 +1,100 @@
+--- suse/sysconfig.icecream.orig       2007-04-12 10:02:33.000000000 +0200
++++ suse/sysconfig.icecream    2007-07-17 15:50:39.000000000 +0200
+@@ -1,69 +1,34 @@
+ #
+-## Type: integer(0:19)
+-## Path: Applications/icecream
+-## Description: Icecream settings
+-## ServiceRestart: icecream
+-## Default: 5
+-#
+ # Nice level of running compilers
+ #
+ ICECREAM_NICE_LEVEL="5"
+ #
+-## Type: string
+-## Path: Applications/icecream
+-## Defaut: /var/log/iceccd
+-#
+ # icecream daemon log file
+ #
+ ICECREAM_LOG_FILE="/var/log/iceccd"
+ #
+-## Type: string
+-## Path: Applications/icecream
+-## Defaut: no
+-#
+-# Start also the scheduler?
+-#
+-ICECREAM_RUN_SCHEDULER="no"
+-
+-#
+-## Type: string
+-## Path: Applications/icecream
+-## Defaut: /var/log/icecc_scheduler
+-#
+ # icecream scheduler log file
+ #
+-ICECREAM_SCHEDULER_LOG_FILE="/var/log/icecc_scheduler"
++ICECREAM_SCHEDULER_LOG_FILE="/var/log/icecc-scheduler"
+ #
+-## Type: string
+-## Path: Applications/icecream
+-## Defaut: ""
+-#
+-# Identification for the network the scheduler and daemon run on. 
++# Identification for the network the scheduler and daemon run on.
+ # You can have several distinct icecream networks in the same LAN
+ # for whatever reason.
+ #
+ ICECREAM_NETNAME=""
+ #
+-## Type: string
+-## Path: Applications/icecream
+-## Defaut: ""
+-#
+-# If the daemon can't find the scheduler by broadcast (e.g. because 
++# If the daemon can't find the scheduler by broadcast (e.g. because
+ # of a firewall) you can specify it.
+ #
+ ICECREAM_SCHEDULER_HOST=""
+ #
+-## Type: integer
+-## Path: Applications/icecream
+-## Defaut: ""
+-# 
+ # You can overwrite here the number of jobs to run in parallel. Per
+-# default this depends on the number of (virtual) CPUs installed. 
++# default this depends on the number of (virtual) CPUs installed.
+ #
+ # Note: a value of "0" is actually interpreted as "1", however it
+ # also sets ICECREAM_ALLOW_REMOTE="no".
+@@ -71,22 +36,14 @@ ICECREAM_SCHEDULER_HOST=""
+ ICECREAM_MAX_JOBS=""
+ #
+-## Type: yesno
+-## Path: Applications/icecream
+-## Defaut: "yes"
+-# 
+ # Specifies whether jobs submitted by other nodes are allowed to run on
+ # this one.
+ #
+ ICECREAM_ALLOW_REMOTE="yes"
+ #
+-## Type: string
+-## Path: Applications/icecream
+-## Default: "/var/cache/icecream"
+-#
+ # This is the directory where the icecream daemon stores the environments
+ # it compiles in. In a big network this can grow quite a bit, so use some
+ # path if your /tmp is small - but the user icecream has to write to it.
+-# 
++#
+ ICECREAM_BASEDIR="/var/cache/icecream"
diff --git a/pkgs/core/icecream/patches/icecream-rename-scheduler.patch b/pkgs/core/icecream/patches/icecream-rename-scheduler.patch
new file mode 100644 (file)
index 0000000..5de7738
--- /dev/null
@@ -0,0 +1,107 @@
+Index: icecc-0.9.6/doc/man-scheduler.1.docbook
+===================================================================
+--- icecc-0.9.6.orig/doc/man-scheduler.1.docbook
++++ icecc-0.9.6/doc/man-scheduler.1.docbook
+@@ -23,13 +23,13 @@
+ </refmeta>
+ <refnamediv>
+-      <refname>scheduler</refname>
++      <refname>icecc-scheduler</refname>
+       <refpurpose>Icecream scheduler</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+-<command>scheduler</command>
++<command>icecc-scheduler</command>
+ <group>
+   <arg choice="opt">
+     <option>-n</option>
+@@ -151,7 +151,7 @@ need to run the scheduler with root righ
+ <refsect1>
+ <title>See Also</title>
+-<para>icecream, scheduler, iceccd, icemon</para>
++<para>icecream, icecc-scheduler, iceccd, icemon</para>
+ </refsect1>
+ <refsect1>
+Index: icecc-0.9.6/services/Makefile.am
+===================================================================
+--- icecc-0.9.6.orig/services/Makefile.am
++++ icecc-0.9.6/services/Makefile.am
+@@ -11,9 +11,9 @@ ice_HEADERS = job.h comm.h
+ noinst_HEADERS = bench.h exitcode.h getifaddrs.h logging.h tempfile.h platform.h
+ icedir = $(includedir)/icecc
+-sbin_PROGRAMS = scheduler
+-scheduler_SOURCES = scheduler.cpp
+-scheduler_LDADD = libicecc.la
++sbin_PROGRAMS = icecc-scheduler
++icecc_scheduler_SOURCES = scheduler.cpp
++icecc_scheduler_LDADD = libicecc.la
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = icecc.pc
+Index: icecc-0.9.6/services/Makefile.in
+===================================================================
+--- icecc-0.9.6.orig/services/Makefile.in
++++ icecc-0.9.6/services/Makefile.in
+@@ -37,7 +37,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-sbin_PROGRAMS = scheduler$(EXEEXT)
++sbin_PROGRAMS = icecc-scheduler$(EXEEXT)
+ subdir = services
+ DIST_COMMON = $(ice_HEADERS) $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/icecc.pc.in
+@@ -82,9 +82,9 @@ libicecc_la_LINK = $(LIBTOOL) --tag=CXX 
+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libicecc_la_CXXFLAGS) \
+       $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ PROGRAMS = $(sbin_PROGRAMS)
+-am_scheduler_OBJECTS = scheduler.$(OBJEXT)
+-scheduler_OBJECTS = $(am_scheduler_OBJECTS)
+-scheduler_DEPENDENCIES = libicecc.la
++am_icecc_scheduler_OBJECTS = scheduler.$(OBJEXT)
++icecc_scheduler_OBJECTS = $(am_icecc_scheduler_OBJECTS)
++icecc_scheduler_DEPENDENCIES = libicecc.la
+ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -107,8 +107,8 @@ CXXLD = $(CXX)
+ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+-SOURCES = $(libicecc_la_SOURCES) $(scheduler_SOURCES)
+-DIST_SOURCES = $(libicecc_la_SOURCES) $(scheduler_SOURCES)
++SOURCES = $(libicecc_la_SOURCES) $(icecc_scheduler_SOURCES)
++DIST_SOURCES = $(libicecc_la_SOURCES) $(icecc_scheduler_SOURCES)
+ DATA = $(pkgconfig_DATA)
+ HEADERS = $(ice_HEADERS) $(noinst_HEADERS)
+ ETAGS = etags
+@@ -242,8 +242,8 @@ libicecc_la_CXXFLAGS = -fPIC -DPIC
+ ice_HEADERS = job.h comm.h
+ noinst_HEADERS = bench.h exitcode.h getifaddrs.h logging.h tempfile.h platform.h
+ icedir = $(includedir)/icecc
+-scheduler_SOURCES = scheduler.cpp
+-scheduler_LDADD = libicecc.la
++icecc_scheduler_SOURCES = scheduler.cpp
++icecc_scheduler_LDADD = libicecc.la
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = icecc.pc
+ all: all-am
+@@ -358,9 +358,9 @@ clean-sbinPROGRAMS:
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+-scheduler$(EXEEXT): $(scheduler_OBJECTS) $(scheduler_DEPENDENCIES) 
+-      @rm -f scheduler$(EXEEXT)
+-      $(CXXLINK) $(scheduler_OBJECTS) $(scheduler_LDADD) $(LIBS)
++icecc-scheduler$(EXEEXT): $(icecc_scheduler_OBJECTS) $(icecc_scheduler_DEPENDENCIES) 
++      @rm -f icecc-scheduler$(EXEEXT)
++      $(CXXLINK) $(icecc_scheduler_OBJECTS) $(icecc_scheduler_LDADD) $(LIBS)
+ mostlyclean-compile:
+       -rm -f *.$(OBJEXT)