]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - icecream/icecream.nm
Add a -debuginfo for every package that is not noarch.
[people/arne_f/ipfire-3.x.git] / icecream / icecream.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = icecream
7 version = 0.9.7
8 release = 2
9
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.
15
16 description
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
23 locally on the node where the compilation is started.
24 end
25
26 source_dl = ftp://ftp.suse.com/pub/projects/icecream/
27 sources = \
28 icecc-%{version}.tar.bz2 \
29 icecream-manpages.tar.bz2
30
31 build
32 requires
33 gcc-c++
34 end
35
36 DIR_APP = %{DIR_SRC}/icecc-%{version}
37
38 configure_options += \
39 --disable-static \
40 --enable-shared
41
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
49 install_cmds
50 ICECREAM_TARGET_PLATFORM=$(echo %{DISTRO_MACHINE} | sed -e "s/-gnu//g")
51
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
58
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
62
63 # create default working dir
64 mkdir -pv %{BUILDROOT}/var/cache/icecream
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
78
79 # Create Logfiles.
80 mkdir -pv %{BUILDROOT}/var/log
81 touch %{BUILDROOT}/var/log/icecc{d,-scheduler}.log
82 end
83 end
84
85 packages
86 package %{name}
87 requires
88 gcc-c++
89 /usr/bin/ldd
90 end
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
114 end
115
116 package %{name}-devel
117 template DEVEL
118 end
119
120 package %{name}-debuginfo
121 template DEBUGINFO
122 end
123 end