############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = icecream version = 0.9.7 release = 2 maintainer = Michael Tremer groups = Development/Compilers url = http://en.opensuse.org/Icecream license = GPLv2+ summary = Distributed compiler. 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. end source_dl = ftp://ftp.suse.com/pub/projects/icecream/ sources = \ icecc-%{version}.tar.bz2 \ icecream-manpages.tar.bz2 build requires gcc-c++ end DIR_APP = %{DIR_SRC}/icecc-%{version} configure_options += \ --disable-static \ --enable-shared prepare cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/icecc-%{version}.tar.bz2 cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/icecream-manpages.tar.bz2 %{MACRO_PATCHES} end install_cmds ICECREAM_TARGET_PLATFORM=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g") 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/%{ICECREAM_TARGET_PLATFORM}-${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 # install manpages mkdir -pv %{BUILDROOT}/usr/share/man/man{1,7,8} mv mans/scheduler.1 mans/icecc-scheduler.1 for i in mans/*.1 mans/*.7; do install -m 644 $i %{BUILDROOT}/usr/share/man/man${i##*.} done # Remove unwanted symlinks. rm -rvf %{BUILDROOT}/usr/bin/c++ rm -rvf %{BUILDROOT}/usr/bin/cc rm -rvf %{BUILDROOT}/usr/bin/g++ rm -rvf %{BUILDROOT}/usr/bin/gcc # Create Logfiles. mkdir -pv %{BUILDROOT}/var/log touch %{BUILDROOT}/var/log/icecc{d,-scheduler}.log end end packages package %{name} requires gcc-c++ /usr/bin/ldd end prerequires += systemd-units script postin /bin/systemctl daemon-reload >/dev/null 2>&1 || : end script preun /bin/systemctl --no-reload disable iceccd.service \ icecc-scheduler.service >/dev/null 2>&1 || : /bin/systemctl stop iceccd.service \ icecc-scheduler.service >/dev/null 2>&1 || : end script postun /bin/systemctl daemon-reload >/dev/null 2>&1 || : end script postup /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl try-restart iceccd.service \ icecc-scheduler.service >/dev/null 2>&1 || : end end package %{name}-devel template DEVEL end end