3 # /etc/distcc/clients.allow
4 # /etc/distcc/commands.allow.sh
8 %bcond_with gnome # build without gnome(monitor) support
10 Summary: Program to distribute compilation of C or C++
11 Summary(pl.UTF-8): Program do rozdzielania kompilacji programów w C lub C++
16 Group: Development/Languages
17 Source0: https://github.com/distcc/distcc/archive/v%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: 00523fd05f4cd9dd968e4e0ec09d774d
19 Source1: %{name}.inetd
23 Source5: %{name}.config
24 Source6: %{name}.logrotate
25 Patch0: %{name}-user.patch
26 URL: http://www.distcc.org/
27 BuildRequires: autoconf >= 2.53
28 BuildRequires: automake
29 %{?with_gnome:BuildRequires: libgnomeui-devel >= 2.0}
30 BuildRequires: pkgconfig
31 BuildRequires: popt-devel
32 BuildRequires: python3-devel
33 BuildRequires: python3-devel-tools
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.268
36 BuildRequires: sed >= 4.0
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 distcc is a program to distribute compilation of C or C++ code across
41 several machines on a network. distcc should always generate the same
42 results as a local compile, is simple to install and use, and is often
43 two or more times faster than a local compile.
45 %description -l pl.UTF-8
46 distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++
47 na kilka maszyn w sieci. distcc powinien zawsze generować takie same
48 rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu
49 oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja.
52 Summary: Common files for inetd and standalone versions of distcc
53 Summary(pl.UTF-8): Pliki wspólne dla wersji inetd i standalone distcc
55 Requires(postun): /usr/sbin/groupdel
56 Requires(postun): /usr/sbin/userdel
57 Requires(pre): /bin/id
58 Requires(pre): /usr/bin/getgid
59 Requires(pre): /usr/sbin/groupadd
60 Requires(pre): /usr/sbin/useradd
63 Provides: group(distcc)
64 Provides: user(distcc)
65 Obsoletes: distcc < 2.1-2
68 distcc is a program to distribute compilation of C or C++ code across
69 several machines on a network. distcc should always generate the same
70 results as a local compile, is simple to install and use, and is often
71 two or more times faster than a local compile.
73 %description common -l pl.UTF-8
74 distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++
75 na kilka maszyn w sieci. distcc powinien zawsze generować takie same
76 rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu
77 oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja.
79 %package include_server
80 Summary: Conservative approximation of include dependencies for C/C++
81 Summary(pl.UTF-8): Konserwatywna aproksymacja zależności nagłówków dla C/C++
84 %description include_server
85 include_server.py starts an include server process. This process
86 answers queries from distcc(1) clients about what files to include in
87 C/C++ compilations. The include_server.py command itself terminates as
88 soon as the include server has been spawned.
90 %description include_server -l pl.UTF-8
91 include_server.py wywołuje proces serwera include. Proces ten
92 odpowiada na zapytania klientów distcc(1) dotyczące plików, które
93 należy dołączyć na etapie kompilacji C/C++. Polecenie
94 incluse_server.py kończy działanie jak tylko wywołany zostanie proces
98 Summary: inetd configs for distcc
99 Summary(pl.UTF-8): Pliki konfiguracyjne do użycia distcc poprzez inetd
101 Requires: %{name}-common = %{version}-%{release}
103 Obsoletes: distcc < 2.1-2
106 distcc configs for running from inetd.
108 %description inetd -l pl.UTF-8
109 Pliki konfiguracyjna distcc do startowania demona poprzez inetd.
112 Summary: Standalone daemon configs for distcc
113 Summary(pl.UTF-8): Pliki konfiguracyjne do startowania distcc w trybie standalone
115 Requires(post,preun): /sbin/chkconfig
116 Requires: %{name}-common = %{version}-%{release}
118 Obsoletes: distcc < 2.1-2
120 %description standalone
121 distcc configs for running as a standalone daemon.
123 %description standalone -l pl.UTF-8
124 Pliki konfiguracyjne distcc do startowania demona w trybie standalone.
127 Summary: Monitor for distcc
128 Summary(pl.UTF-8): Monitor dla distcc
134 %description monitor -l pl.UTF-8
137 %package monitor-gnome
138 Summary: GTK+ monitor for distcc
139 Summary(pl.UTF-8): Monitor GTK+ dla distcc
140 Group: X11/Applications
142 %description monitor-gnome
143 GTK+ monitor for distcc.
145 %description monitor-gnome -l pl.UTF-8
146 Monitor GTK+ dla distcc.
152 %{__sed} -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c
155 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
156 update-distcc-symlinks.py
164 %{?with_gnome:--with-gnome}
171 rm -rf $RPM_BUILD_ROOT
172 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
173 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
176 DESTDIR=$RPM_BUILD_ROOT
178 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
179 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
180 cp -p %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
181 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/default/distcc
182 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
183 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
185 #%py3_comp $RPM_BUILD_ROOT%{py_sitedir}
188 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
189 $RPM_BUILD_ROOT%{_desktopdir}
190 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
191 $RPM_BUILD_ROOT%{_pixmapsdir}
194 touch $RPM_BUILD_ROOT%{_var}/log/distcc
195 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
198 rm -rf $RPM_BUILD_ROOT
201 %groupadd -P %{name}-common -g 137 distcc
202 %useradd -P %{name}-common -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc
205 if [ "$1" = "0" ]; then
211 %service -q rc-inetd reload
214 if [ "$1" = 0 ]; then
215 %service -q rc-inetd reload
219 /sbin/chkconfig --add distcc
220 %service distcc restart "distcc daemon"
223 if [ "$1" = "0" ]; then
225 /sbin/chkconfig --del distcc
229 %defattr(644,root,root,755)
230 %doc AUTHORS NEWS README *.txt
231 %attr(755,root,root) %{_bindir}/%{name}
232 %attr(755,root,root) %{_bindir}/lsdistcc
233 %attr(755,root,root) %{_bindir}/pump
234 %attr(755,root,root) %{_sbindir}/update-distcc-symlinks
235 %{_mandir}/man?/%{name}.*
236 %{_mandir}/man1/pump.1*
237 %{_mandir}/man1/lsdistcc.1*
238 %attr(755,root,root) /etc/profile.d/*sh
241 %defattr(644,root,root,755)
243 /etc/distcc/clients.allow
244 /etc/distcc/commands.allow.sh
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
248 %attr(755,root,root) %{_bindir}/%{name}d
249 %{_mandir}/man?/%{name}d.*
250 %attr(640,distcc,root) %ghost %{_var}/log/distcc
252 %files include_server
253 %defattr(644,root,root,755)
254 %{py3_sitedir}/include_server
255 %{py3_sitedir}/include_server-*.egg-info
256 %{_mandir}/man1/include_server.1*
259 %defattr(644,root,root,755)
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/distccd
263 %defattr(644,root,root,755)
264 %attr(754,root,root) /etc/rc.d/init.d/distcc
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_bindir}/distccmon-text
269 %{_mandir}/man1/distccmon-text.*
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/distccmon-gnome
275 %{_desktopdir}/*.desktop