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