]>
Commit | Line | Data |
---|---|---|
ac9e77da | 1 | # |
2 | # Conditional build: | |
23795b41 | 3 | %bcond_without gnome # build without gnome(monitor) support |
5fac6119 | 4 | # |
6aad4547 | 5 | Summary: Program to distribute compilation of C or C++ |
363c8ff8 | 6 | Summary(pl.UTF-8): Program do rozdzielania kompilacji programów w C lub C++ |
6aad4547 | 7 | Name: distcc |
a9754eaf | 8 | Version: 3.1 |
9c952e41 | 9 | Release: 0.1 |
6aad4547 | 10 | License: GPL |
e6318e62 | 11 | Group: Development/Languages |
9c952e41 | 12 | Source0: http://distcc.googlecode.com/files/%{name}-%{version}.tar.bz2 |
a9754eaf | 13 | # Source0-md5: a1a9d3853df7133669fffec2a9aab9f3 |
6aad4547 | 14 | Source1: %{name}.inetd |
953fcc0d | 15 | Source2: %{name}.init |
16 | Source3: %{name}.sh | |
17 | Source4: %{name}.csh | |
fc307e5b | 18 | Source5: %{name}.config |
9d35c6e8 | 19 | Source6: %{name}.logrotate |
454bf4cb | 20 | Patch0: %{name}-user.patch |
9c952e41 | 21 | URL: http://www.distcc.org/ |
4ff4770e | 22 | BuildRequires: autoconf >= 2.53 |
6e659ed6 | 23 | BuildRequires: automake |
55a0572b | 24 | %{?with_gnome:BuildRequires: libgnomeui-devel >= 2.0} |
54448e74 | 25 | BuildRequires: pkgconfig |
cf3c1b61 | 26 | BuildRequires: popt-devel |
476c7f2e | 27 | BuildRequires: python-devel |
9c952e41 | 28 | BuildRequires: python-devel-tools |
476c7f2e | 29 | BuildRequires: rpm-pythonprov |
e6318e62 | 30 | BuildRequires: rpmbuild(macros) >= 1.268 |
29c8cd62 | 31 | BuildRequires: sed >= 4.0 |
6aad4547 AM |
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 | ||
06d40241 JR |
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. | |
6aad4547 | 45 | |
953fcc0d | 46 | %package common |
725fa96f | 47 | Summary: Common files for inetd and standalone versions of distcc |
363c8ff8 | 48 | Summary(pl.UTF-8): Pliki wspólne dla wersji inetd i standalone distcc |
0e630aaf | 49 | Group: Daemons |
e6318e62 ER |
50 | Requires(postun): /usr/sbin/groupdel |
51 | Requires(postun): /usr/sbin/userdel | |
1f47eaf4 | 52 | Requires(pre): /bin/id |
53 | Requires(pre): /usr/bin/getgid | |
54 | Requires(pre): /usr/sbin/groupadd | |
47a5d923 | 55 | Requires(pre): /usr/sbin/useradd |
c1cecbca | 56 | Suggests: gcc |
57 | Suggests: gcc-c++ | |
1f47eaf4 | 58 | Provides: group(distcc) |
59 | Provides: user(distcc) | |
55a0572b | 60 | Obsoletes: distcc < 2.1-2 |
953fcc0d | 61 | |
953fcc0d | 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 | ||
06d40241 JR |
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. | |
953fcc0d | 73 | |
9c952e41 | 74 | %package include_server |
9677354d JB |
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++ | |
9c952e41 AG |
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 | ||
953fcc0d | 91 | %package inetd |
92 | Summary: inetd configs for distcc | |
363c8ff8 | 93 | Summary(pl.UTF-8): Pliki konfiguracyjne do użycia distcc poprzez inetd |
0e630aaf | 94 | Group: Daemons |
e6318e62 ER |
95 | Requires: %{name}-common = %{version}-%{release} |
96 | Requires: rc-inetd | |
55a0572b | 97 | Obsoletes: distcc < 2.1-2 |
953fcc0d | 98 | |
99 | %description inetd | |
100 | distcc configs for running from inetd. | |
101 | ||
06d40241 | 102 | %description inetd -l pl.UTF-8 |
953fcc0d | 103 | Pliki konfiguracyjna distcc do startowania demona poprzez inetd. |
104 | ||
105 | %package standalone | |
8a419537 | 106 | Summary: Standalone daemon configs for distcc |
363c8ff8 | 107 | Summary(pl.UTF-8): Pliki konfiguracyjne do startowania distcc w trybie standalone |
953fcc0d | 108 | Group: Daemons |
cf89e5cf | 109 | Requires(post,preun): /sbin/chkconfig |
e6318e62 ER |
110 | Requires: %{name}-common = %{version}-%{release} |
111 | Requires: rc-scripts | |
55a0572b | 112 | Obsoletes: distcc < 2.1-2 |
953fcc0d | 113 | |
114 | %description standalone | |
115 | distcc configs for running as a standalone daemon. | |
116 | ||
06d40241 | 117 | %description standalone -l pl.UTF-8 |
47a5d923 | 118 | Pliki konfiguracyjne distcc do startowania demona w trybie standalone. |
953fcc0d | 119 | |
51fb516c | 120 | %package monitor |
1f47eaf4 | 121 | Summary: Monitor for distcc |
363c8ff8 | 122 | Summary(pl.UTF-8): Monitor dla distcc |
1f47eaf4 | 123 | Group: Applications |
51fb516c AM |
124 | |
125 | %description monitor | |
126 | Monitor for distcc. | |
127 | ||
06d40241 | 128 | %description monitor -l pl.UTF-8 |
51fb516c AM |
129 | Monitor dla distcc. |
130 | ||
131 | %package monitor-gnome | |
1f47eaf4 | 132 | Summary: GTK+ monitor for distcc |
363c8ff8 | 133 | Summary(pl.UTF-8): Monitor GTK+ dla distcc |
1f47eaf4 | 134 | Group: X11/Applications |
51fb516c AM |
135 | |
136 | %description monitor-gnome | |
c8eab2f6 | 137 | GTK+ monitor for distcc. |
51fb516c | 138 | |
06d40241 | 139 | %description monitor-gnome -l pl.UTF-8 |
c8eab2f6 | 140 | Monitor GTK+ dla distcc. |
51fb516c | 141 | |
6aad4547 AM |
142 | %prep |
143 | %setup -q | |
fc00bbf7 | 144 | %patch0 -p1 |
454bf4cb | 145 | |
8ec2d073 | 146 | sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c |
6e659ed6 JB |
147 | |
148 | %build | |
9c952e41 | 149 | %{__aclocal} |
e3949423 | 150 | %{__autoconf} |
151 | %{__autoheader} | |
ac9e77da | 152 | %configure \ |
c5869176 | 153 | --enable-rfc2553 \ |
47a5d923 | 154 | %{?with_gnome:--with-gnome} |
ac9e77da | 155 | |
9c952e41 | 156 | %{__make} \ |
531ce2da | 157 | WERROR_CFLAGS="" \ |
9c952e41 | 158 | CC="%{__cc}" |
6aad4547 AM |
159 | |
160 | %install | |
161 | rm -rf $RPM_BUILD_ROOT | |
9d35c6e8 | 162 | install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \ |
6e659ed6 | 163 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log} |
6aad4547 | 164 | |
87073c74 PG |
165 | %{__make} install \ |
166 | DESTDIR=$RPM_BUILD_ROOT | |
953fcc0d | 167 | |
6aad4547 | 168 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd |
953fcc0d | 169 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc |
170 | install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d | |
fc3f3536 | 171 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd |
9d35c6e8 | 172 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd |
6aad4547 | 173 | |
9c952e41 AG |
174 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
175 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
176 | %py_postclean | |
177 | ||
5fac6119 | 178 | %if %{with gnome} |
865c00be | 179 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \ |
55a0572b | 180 | $RPM_BUILD_ROOT%{_desktopdir} |
865c00be | 181 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \ |
e3949423 | 182 | $RPM_BUILD_ROOT%{_pixmapsdir} |
183 | %endif | |
184 | ||
5fac6119 | 185 | touch $RPM_BUILD_ROOT%{_var}/log/distcc |
9c952e41 AG |
186 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} |
187 | ||
e3949423 | 188 | |
725fa96f JB |
189 | %clean |
190 | rm -rf $RPM_BUILD_ROOT | |
191 | ||
9536ab6c | 192 | %pre common |
6e7561ad ER |
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 | |
607bc1af | 195 | |
9536ab6c AM |
196 | %postun common |
197 | if [ "$1" = "0" ]; then | |
1f47eaf4 | 198 | %userremove distcc |
199 | %groupremove distcc | |
9536ab6c AM |
200 | fi |
201 | ||
953fcc0d | 202 | %post inetd |
e6318e62 | 203 | %service -q rc-inetd reload |
6aad4547 | 204 | |
953fcc0d | 205 | %postun inetd |
48f922ca ER |
206 | if [ "$1" = 0 ]; then |
207 | %service -q rc-inetd reload | |
208 | fi | |
6aad4547 | 209 | |
953fcc0d | 210 | %post standalone |
211 | /sbin/chkconfig --add distcc | |
e6318e62 | 212 | %service distcc restart "distcc daemon" |
953fcc0d | 213 | |
214 | %preun standalone | |
215 | if [ "$1" = "0" ]; then | |
e6318e62 | 216 | %service distcc stop |
a6d80f15 | 217 | /sbin/chkconfig --del distcc |
953fcc0d | 218 | fi |
219 | ||
51fb516c | 220 | %files |
6aad4547 | 221 | %defattr(644,root,root,755) |
e35de25d | 222 | %doc AUTHORS NEWS README *.txt |
51fb516c | 223 | %attr(755,root,root) %{_bindir}/%{name} |
9c952e41 AG |
224 | %attr(755,root,root) %{_bindir}/lsdistcc |
225 | %attr(755,root,root) %{_bindir}/pump | |
5fac6119 | 226 | %{_mandir}/man?/%{name}.* |
9c952e41 | 227 | %{_mandir}/man1/pump.1* |
32cbd1d6 | 228 | %attr(755,root,root) /etc/profile.d/*sh |
953fcc0d | 229 | |
51fb516c AM |
230 | %files common |
231 | %defattr(644,root,root,755) | |
47a5d923 ER |
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 | |
51fb516c | 234 | %attr(755,root,root) %{_bindir}/%{name}d |
5fac6119 | 235 | %{_mandir}/man?/%{name}d.* |
607bc1af | 236 | %attr(640,distcc,root) %ghost %{_var}/log/distcc |
51fb516c | 237 | |
9c952e41 AG |
238 | %files include_server |
239 | %defattr(644,root,root,755) | |
240 | %{py_sitedir}/include_server | |
241 | %{_mandir}/man1/include_server.1* | |
242 | ||
953fcc0d | 243 | %files inetd |
5fac6119 | 244 | %defattr(644,root,root,755) |
47a5d923 | 245 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/distccd |
953fcc0d | 246 | |
247 | %files standalone | |
5fac6119 | 248 | %defattr(644,root,root,755) |
6a436b6c | 249 | %attr(754,root,root) /etc/rc.d/init.d/distcc |
51fb516c AM |
250 | |
251 | %files monitor | |
64cd2051 | 252 | %defattr(644,root,root,755) |
51fb516c | 253 | %attr(755,root,root) %{_bindir}/distccmon-text |
865c00be | 254 | %{_mandir}/man1/distccmon-text.* |
8ec2d073 | 255 | |
5fac6119 | 256 | %if %{with gnome} |
8ec2d073 | 257 | %files monitor-gnome |
55a0572b | 258 | %defattr(644,root,root,755) |
e3949423 | 259 | %attr(755,root,root) %{_bindir}/distccmon-gnome |
55a0572b JB |
260 | %{_desktopdir}/*.desktop |
261 | %{_pixmapsdir}/*.png | |
e3949423 | 262 | %endif |