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