]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - icecream/icecream.nm
json-glib: New package.
[people/ms/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 = 3
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 mkdir -pv %{BUILDROOT}%{libdir}/icecc/bin
51 for i in gcc g++ cc c++; do
52 ln -svf ../../../bin/icecc %{BUILDROOT}%{libdir}/icecc/bin/${i}
53 ln -svf ../../../bin/icecc %{BUILDROOT}%{libdir}/icecc/bin/%{DISTRO_BUILDTARGET}-${i}
54 done
55 sed -e 's|^#!.*|#!/bin/bash|' -i %{BUILDROOT}%{libdir}/icecc/icecc-create-env
56
57 mkdir -pv %{BUILDROOT}/etc/profile.d
58 sed -e "s|@LIBDIR@|%{libdir}|g" \
59 < %{DIR_SOURCE}/icecream.sh > %{BUILDROOT}/etc/profile.d/icecream.sh
60
61 # create default working dir
62 mkdir -pv %{BUILDROOT}/var/cache/icecream
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
76
77 # Create Logfiles.
78 mkdir -pv %{BUILDROOT}/var/log
79 touch %{BUILDROOT}/var/log/icecc{d,-scheduler}.log
80 end
81 end
82
83 packages
84 package %{name}
85 requires
86 gcc-c++
87 /usr/bin/ldd
88 end
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
112 end
113
114 package %{name}-devel
115 template DEVEL
116 end
117
118 package %{name}-debuginfo
119 template DEBUGINFO
120 end
121 end