]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without gnome # build without gnome(monitor) support | |
4 | # | |
5 | Summary: Program to distribute compilation of C or C++ | |
6 | Summary(pl.UTF-8): Program do rozdzielania kompilacji programów w C lub C++ | |
7 | Name: distcc | |
8 | Version: 3.1 | |
9 | Release: 0.1 | |
10 | License: GPL | |
11 | Group: Development/Languages | |
12 | Source0: http://distcc.googlecode.com/files/%{name}-%{version}.tar.bz2 | |
13 | # Source0-md5: a1a9d3853df7133669fffec2a9aab9f3 | |
14 | Source1: %{name}.inetd | |
15 | Source2: %{name}.init | |
16 | Source3: %{name}.sh | |
17 | Source4: %{name}.csh | |
18 | Source5: %{name}.config | |
19 | Source6: %{name}.logrotate | |
20 | Patch0: %{name}-user.patch | |
21 | URL: http://www.distcc.org/ | |
22 | BuildRequires: autoconf >= 2.53 | |
23 | BuildRequires: automake | |
24 | %{?with_gnome:BuildRequires: libgnomeui-devel >= 2.0} | |
25 | BuildRequires: pkgconfig | |
26 | BuildRequires: popt-devel | |
27 | BuildRequires: python-devel | |
28 | BuildRequires: python-devel-tools | |
29 | BuildRequires: rpm-pythonprov | |
30 | BuildRequires: rpmbuild(macros) >= 1.268 | |
31 | BuildRequires: sed >= 4.0 | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | distcc is a program to distribute compilation of C or C++ code across | |
36 | several machines on a network. distcc should always generate the same | |
37 | results as a local compile, is simple to install and use, and is often | |
38 | two or more times faster than a local compile. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++ | |
42 | na kilka maszyn w sieci. distcc powinien zawsze generować takie same | |
43 | rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu | |
44 | oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja. | |
45 | ||
46 | %package common | |
47 | Summary: Common files for inetd and standalone versions of distcc | |
48 | Summary(pl.UTF-8): Pliki wspólne dla wersji inetd i standalone distcc | |
49 | Group: Daemons | |
50 | Requires(postun): /usr/sbin/groupdel | |
51 | Requires(postun): /usr/sbin/userdel | |
52 | Requires(pre): /bin/id | |
53 | Requires(pre): /usr/bin/getgid | |
54 | Requires(pre): /usr/sbin/groupadd | |
55 | Requires(pre): /usr/sbin/useradd | |
56 | Suggests: gcc | |
57 | Suggests: gcc-c++ | |
58 | Provides: group(distcc) | |
59 | Provides: user(distcc) | |
60 | Obsoletes: distcc < 2.1-2 | |
61 | ||
62 | %description common | |
63 | distcc is a program to distribute compilation of C or C++ code across | |
64 | several machines on a network. distcc should always generate the same | |
65 | results as a local compile, is simple to install and use, and is often | |
66 | two or more times faster than a local compile. | |
67 | ||
68 | %description common -l pl.UTF-8 | |
69 | distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++ | |
70 | na kilka maszyn w sieci. distcc powinien zawsze generować takie same | |
71 | rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu | |
72 | oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja. | |
73 | ||
74 | %package include_server | |
75 | Summary: Conservative approximation of include dependencies for C/C++ | |
76 | Summary(pl.UTF-8): Konserwatywna aproksymacja zależności nagłówków dla C/C++ | |
77 | Group: Daemons | |
78 | ||
79 | %description include_server | |
80 | include_server.py starts an include server process. This process | |
81 | answers queries from distcc(1) clients about what files to include in | |
82 | C/C++ compilations. The include_server.py command itself terminates as | |
83 | soon as the include server has been spawned. | |
84 | ||
85 | %description include_server -l pl.UTF-8 | |
86 | include_server.py wywołuje proces serwera include. Proces ten odpowiada | |
87 | na zapytania klientów distcc(1) dotyczące plików, które należy dołączyć | |
88 | na etapie kompilacji C/C++. Polecenie incluse_server.py kończy działanie | |
89 | jak tylko wywołany zostanie proces serwera. | |
90 | ||
91 | %package inetd | |
92 | Summary: inetd configs for distcc | |
93 | Summary(pl.UTF-8): Pliki konfiguracyjne do użycia distcc poprzez inetd | |
94 | Group: Daemons | |
95 | Requires: %{name}-common = %{version}-%{release} | |
96 | Requires: rc-inetd | |
97 | Obsoletes: distcc < 2.1-2 | |
98 | ||
99 | %description inetd | |
100 | distcc configs for running from inetd. | |
101 | ||
102 | %description inetd -l pl.UTF-8 | |
103 | Pliki konfiguracyjna distcc do startowania demona poprzez inetd. | |
104 | ||
105 | %package standalone | |
106 | Summary: Standalone daemon configs for distcc | |
107 | Summary(pl.UTF-8): Pliki konfiguracyjne do startowania distcc w trybie standalone | |
108 | Group: Daemons | |
109 | Requires(post,preun): /sbin/chkconfig | |
110 | Requires: %{name}-common = %{version}-%{release} | |
111 | Requires: rc-scripts | |
112 | Obsoletes: distcc < 2.1-2 | |
113 | ||
114 | %description standalone | |
115 | distcc configs for running as a standalone daemon. | |
116 | ||
117 | %description standalone -l pl.UTF-8 | |
118 | Pliki konfiguracyjne distcc do startowania demona w trybie standalone. | |
119 | ||
120 | %package monitor | |
121 | Summary: Monitor for distcc | |
122 | Summary(pl.UTF-8): Monitor dla distcc | |
123 | Group: Applications | |
124 | ||
125 | %description monitor | |
126 | Monitor for distcc. | |
127 | ||
128 | %description monitor -l pl.UTF-8 | |
129 | Monitor dla distcc. | |
130 | ||
131 | %package monitor-gnome | |
132 | Summary: GTK+ monitor for distcc | |
133 | Summary(pl.UTF-8): Monitor GTK+ dla distcc | |
134 | Group: X11/Applications | |
135 | ||
136 | %description monitor-gnome | |
137 | GTK+ monitor for distcc. | |
138 | ||
139 | %description monitor-gnome -l pl.UTF-8 | |
140 | Monitor GTK+ dla distcc. | |
141 | ||
142 | %prep | |
143 | %setup -q | |
144 | %patch0 -p1 | |
145 | ||
146 | sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c | |
147 | ||
148 | %build | |
149 | %{__aclocal} | |
150 | %{__autoconf} | |
151 | %{__autoheader} | |
152 | %configure \ | |
153 | --enable-rfc2553 \ | |
154 | %{?with_gnome:--with-gnome} | |
155 | ||
156 | %{__make} \ | |
157 | WERROR_CFLAGS="" \ | |
158 | CC="%{__cc}" | |
159 | ||
160 | %install | |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \ | |
163 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log} | |
164 | ||
165 | %{__make} install \ | |
166 | DESTDIR=$RPM_BUILD_ROOT | |
167 | ||
168 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd | |
169 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc | |
170 | install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d | |
171 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd | |
172 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd | |
173 | ||
174 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
175 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
176 | %py_postclean | |
177 | ||
178 | %if %{with gnome} | |
179 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \ | |
180 | $RPM_BUILD_ROOT%{_desktopdir} | |
181 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \ | |
182 | $RPM_BUILD_ROOT%{_pixmapsdir} | |
183 | %endif | |
184 | ||
185 | touch $RPM_BUILD_ROOT%{_var}/log/distcc | |
186 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} | |
187 | ||
188 | ||
189 | %clean | |
190 | rm -rf $RPM_BUILD_ROOT | |
191 | ||
192 | %pre common | |
193 | %groupadd -P %{name}-common -g 137 distcc | |
194 | %useradd -P %{name}-common -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc | |
195 | ||
196 | %postun common | |
197 | if [ "$1" = "0" ]; then | |
198 | %userremove distcc | |
199 | %groupremove distcc | |
200 | fi | |
201 | ||
202 | %post inetd | |
203 | %service -q rc-inetd reload | |
204 | ||
205 | %postun inetd | |
206 | if [ "$1" = 0 ]; then | |
207 | %service -q rc-inetd reload | |
208 | fi | |
209 | ||
210 | %post standalone | |
211 | /sbin/chkconfig --add distcc | |
212 | %service distcc restart "distcc daemon" | |
213 | ||
214 | %preun standalone | |
215 | if [ "$1" = "0" ]; then | |
216 | %service distcc stop | |
217 | /sbin/chkconfig --del distcc | |
218 | fi | |
219 | ||
220 | %files | |
221 | %defattr(644,root,root,755) | |
222 | %doc AUTHORS NEWS README *.txt | |
223 | %attr(755,root,root) %{_bindir}/%{name} | |
224 | %attr(755,root,root) %{_bindir}/lsdistcc | |
225 | %attr(755,root,root) %{_bindir}/pump | |
226 | %{_mandir}/man?/%{name}.* | |
227 | %{_mandir}/man1/pump.1* | |
228 | %attr(755,root,root) /etc/profile.d/*sh | |
229 | ||
230 | %files common | |
231 | %defattr(644,root,root,755) | |
232 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/distccd | |
233 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/distccd | |
234 | %attr(755,root,root) %{_bindir}/%{name}d | |
235 | %{_mandir}/man?/%{name}d.* | |
236 | %attr(640,distcc,root) %ghost %{_var}/log/distcc | |
237 | ||
238 | %files include_server | |
239 | %defattr(644,root,root,755) | |
240 | %{py_sitedir}/include_server | |
241 | %{_mandir}/man1/include_server.1* | |
242 | ||
243 | %files inetd | |
244 | %defattr(644,root,root,755) | |
245 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/distccd | |
246 | ||
247 | %files standalone | |
248 | %defattr(644,root,root,755) | |
249 | %attr(754,root,root) /etc/rc.d/init.d/distcc | |
250 | ||
251 | %files monitor | |
252 | %defattr(644,root,root,755) | |
253 | %attr(755,root,root) %{_bindir}/distccmon-text | |
254 | %{_mandir}/man1/distccmon-text.* | |
255 | ||
256 | %if %{with gnome} | |
257 | %files monitor-gnome | |
258 | %defattr(644,root,root,755) | |
259 | %attr(755,root,root) %{_bindir}/distccmon-gnome | |
260 | %{_desktopdir}/*.desktop | |
261 | %{_pixmapsdir}/*.png | |
262 | %endif |