]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - icecream/icecream.nm
Merge remote-tracking branch 'maniacikarus/samba'
[people/ms/ipfire-3.x.git] / icecream / icecream.nm
CommitLineData
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 6name = icecream
282acce7 7version = 0.9.7
84f3809e 8release = 2
37bc2396 9
802ea3af
MT
10maintainer = Michael Tremer <michael.tremer@ipfire.org>
11groups = Development/Compilers
12url = http://en.opensuse.org/Icecream
13license = GPLv2+
14summary = Distributed compiler.
37bc2396 15
802ea3af 16description
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
24end
25
8a0b7447
SS
26source_dl = ftp://ftp.suse.com/pub/projects/icecream/
27sources = \
28 icecc-%{version}.tar.bz2 \
29 icecream-manpages.tar.bz2
802ea3af
MT
30
31build
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
MT
49 install_cmds
50 ICECREAM_TARGET_PLATFORM=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g")
37bc2396 51
802ea3af
MT
52 mkdir -pv %{BUILDROOT}/usr/lib/icecc/bin
53 for i in gcc g++ cc c++; do
54 ln -svf ../../../bin/icecc %{BUILDROOT}/usr/lib/icecc/bin/${i}
55 ln -svf ../../../bin/icecc %{BUILDROOT}/usr/lib/icecc/bin/%{ICECREAM_TARGET_PLATFORM}-${i}
56 done
57 sed -e 's|^#!.*|#!/bin/bash|' -i %{BUILDROOT}/usr/lib/icecc/icecc-create-env
37bc2396 58
802ea3af
MT
59 mkdir -pv %{BUILDROOT}/etc/profile.d
60 sed -e "s|@LIBDIR@|/usr/lib|g" \
61 < %{DIR_SOURCE}/icecream.sh > %{BUILDROOT}/etc/profile.d/icecream.sh
37bc2396 62
802ea3af
MT
63 # create default working dir
64 mkdir -pv %{BUILDROOT}/var/cache/icecream
8a0b7447
SS
65
66 # install manpages
67 mkdir -pv %{BUILDROOT}/usr/share/man/man{1,7,8}
68 mv mans/scheduler.1 mans/icecc-scheduler.1
69 for i in mans/*.1 mans/*.7; do
70 install -m 644 $i %{BUILDROOT}/usr/share/man/man${i##*.}
71 done
72
73 # Remove unwanted symlinks.
74 rm -rvf %{BUILDROOT}/usr/bin/c++
75 rm -rvf %{BUILDROOT}/usr/bin/cc
76 rm -rvf %{BUILDROOT}/usr/bin/g++
77 rm -rvf %{BUILDROOT}/usr/bin/gcc
84f3809e
SS
78
79 # Create Logfiles.
80 mkdir -pv %{BUILDROOT}/var/log
81 touch %{BUILDROOT}/var/log/icecc{d,-scheduler}.log
802ea3af
MT
82 end
83end
37bc2396 84
802ea3af
MT
85packages
86 package %{name}
8a0b7447
SS
87 requires
88 gcc-c++
89 /usr/bin/ldd
90 end
84f3809e
SS
91
92 prerequires += systemd-units
93
94 script postin
95 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
96 end
97
98 script preun
99 /bin/systemctl --no-reload disable iceccd.service \
100 icecc-scheduler.service >/dev/null 2>&1 || :
101 /bin/systemctl stop iceccd.service \
102 icecc-scheduler.service >/dev/null 2>&1 || :
103 end
104
105 script postun
106 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
107 end
108
109 script postup
110 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
111 /bin/systemctl try-restart iceccd.service \
112 icecc-scheduler.service >/dev/null 2>&1 || :
113 end
802ea3af 114 end
1f9bc2f0 115
802ea3af
MT
116 package %{name}-devel
117 template DEVEL
118 end
1f9bc2f0
MT
119
120 package %{name}-debuginfo
121 template DEBUGINFO
122 end
802ea3af 123end