]>
Commit | Line | Data |
---|---|---|
37bc2396 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
37bc2396 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = icecream |
282acce7 | 7 | version = 0.9.7 |
50abc952 | 8 | release = 3 |
37bc2396 | 9 | |
802ea3af MT |
10 | maintainer = Michael Tremer <michael.tremer@ipfire.org> |
11 | groups = Development/Compilers | |
12 | url = http://en.opensuse.org/Icecream | |
13 | license = GPLv2+ | |
14 | summary = Distributed compiler. | |
37bc2396 | 15 | |
802ea3af | 16 | description |
8a0b7447 SS |
17 | Icecream is a distributed compile system. It allows parallel compiling by |
18 | distributing the compile jobs to several nodes of a compile network running the | |
19 | icecc daemon. The icecc scheduler routes the jobs and provides status and | |
20 | statistics information to the icecc monitor. Each compile node can accept one | |
21 | or more compile jobs depending on the number of processors and the settings of | |
22 | the daemon. Link jobs and other jobs which cannot be distributed are executed | |
37bc2396 | 23 | locally on the node where the compilation is started. |
802ea3af MT |
24 | end |
25 | ||
8a0b7447 SS |
26 | source_dl = ftp://ftp.suse.com/pub/projects/icecream/ |
27 | sources = \ | |
28 | icecc-%{version}.tar.bz2 \ | |
29 | icecream-manpages.tar.bz2 | |
802ea3af MT |
30 | |
31 | build | |
32 | requires | |
33 | gcc-c++ | |
34 | end | |
35 | ||
36 | DIR_APP = %{DIR_SRC}/icecc-%{version} | |
37bc2396 | 37 | |
802ea3af MT |
38 | configure_options += \ |
39 | --disable-static \ | |
40 | --enable-shared | |
37bc2396 | 41 | |
8a0b7447 SS |
42 | prepare |
43 | cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/icecc-%{version}.tar.bz2 | |
44 | cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/icecream-manpages.tar.bz2 | |
45 | ||
46 | %{MACRO_PATCHES} | |
47 | end | |
48 | ||
802ea3af | 49 | install_cmds |
50abc952 | 50 | mkdir -pv %{BUILDROOT}%{libdir}/icecc/bin |
802ea3af | 51 | for i in gcc g++ cc c++; do |
50abc952 MT |
52 | ln -svf ../../../bin/icecc %{BUILDROOT}%{libdir}/icecc/bin/${i} |
53 | ln -svf ../../../bin/icecc %{BUILDROOT}%{libdir}/icecc/bin/%{DISTRO_BUILDTARGET}-${i} | |
802ea3af | 54 | done |
50abc952 | 55 | sed -e 's|^#!.*|#!/bin/bash|' -i %{BUILDROOT}%{libdir}/icecc/icecc-create-env |
37bc2396 | 56 | |
802ea3af | 57 | mkdir -pv %{BUILDROOT}/etc/profile.d |
50abc952 | 58 | sed -e "s|@LIBDIR@|%{libdir}|g" \ |
802ea3af | 59 | < %{DIR_SOURCE}/icecream.sh > %{BUILDROOT}/etc/profile.d/icecream.sh |
37bc2396 | 60 | |
802ea3af MT |
61 | # create default working dir |
62 | mkdir -pv %{BUILDROOT}/var/cache/icecream | |
8a0b7447 SS |
63 | |
64 | # install manpages | |
65 | mkdir -pv %{BUILDROOT}/usr/share/man/man{1,7,8} | |
66 | mv mans/scheduler.1 mans/icecc-scheduler.1 | |
67 | for i in mans/*.1 mans/*.7; do | |
68 | install -m 644 $i %{BUILDROOT}/usr/share/man/man${i##*.} | |
69 | done | |
70 | ||
71 | # Remove unwanted symlinks. | |
72 | rm -rvf %{BUILDROOT}/usr/bin/c++ | |
73 | rm -rvf %{BUILDROOT}/usr/bin/cc | |
74 | rm -rvf %{BUILDROOT}/usr/bin/g++ | |
75 | rm -rvf %{BUILDROOT}/usr/bin/gcc | |
84f3809e SS |
76 | |
77 | # Create Logfiles. | |
78 | mkdir -pv %{BUILDROOT}/var/log | |
79 | touch %{BUILDROOT}/var/log/icecc{d,-scheduler}.log | |
802ea3af MT |
80 | end |
81 | end | |
37bc2396 | 82 | |
802ea3af MT |
83 | packages |
84 | package %{name} | |
8a0b7447 SS |
85 | requires |
86 | gcc-c++ | |
87 | /usr/bin/ldd | |
88 | end | |
84f3809e SS |
89 | |
90 | prerequires += systemd-units | |
91 | ||
92 | script postin | |
93 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
94 | end | |
95 | ||
96 | script preun | |
97 | /bin/systemctl --no-reload disable iceccd.service \ | |
98 | icecc-scheduler.service >/dev/null 2>&1 || : | |
99 | /bin/systemctl stop iceccd.service \ | |
100 | icecc-scheduler.service >/dev/null 2>&1 || : | |
101 | end | |
102 | ||
103 | script postun | |
104 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
105 | end | |
106 | ||
107 | script postup | |
108 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
109 | /bin/systemctl try-restart iceccd.service \ | |
110 | icecc-scheduler.service >/dev/null 2>&1 || : | |
111 | end | |
802ea3af | 112 | end |
1f9bc2f0 | 113 | |
802ea3af MT |
114 | package %{name}-devel |
115 | template DEVEL | |
116 | end | |
1f9bc2f0 MT |
117 | |
118 | package %{name}-debuginfo | |
119 | template DEBUGINFO | |
120 | end | |
802ea3af | 121 | end |