3 %bcond_without gnome # build without gnome(monitor) support
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++
11 Group: Development/Languages
12 Source0: http://distcc.samba.org/ftp/distcc/%{name}-%{version}.tar.bz2
13 # Source0-md5: 0d6b80a1efc3a3d816c4f4175f63eaa2
14 Source1: %{name}.inetd
18 Source5: %{name}.config
19 Source6: %{name}.logrotate
20 Patch0: %{name}-user.patch
21 Patch1: %{name}-as-needed.patch
22 URL: http://distcc.samba.org/
23 BuildRequires: autoconf >= 2.53
24 BuildRequires: automake
25 %{?with_gnome:BuildRequires: libgnomeui-devel >= 2.0}
26 BuildRequires: pkgconfig
27 BuildRequires: popt-devel
28 BuildRequires: rpmbuild(macros) >= 1.268
29 BuildRequires: sed >= 4.0
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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.
45 Summary: Common files for inetd and standalone versions of distcc
46 Summary(pl.UTF-8): Pliki wspólne dla wersji inetd i standalone distcc
48 Requires(postun): /usr/sbin/groupdel
49 Requires(postun): /usr/sbin/userdel
50 Requires(pre): /bin/id
51 Requires(pre): /usr/bin/getgid
52 Requires(pre): /usr/sbin/groupadd
53 Requires(pre): /usr/sbin/useradd
56 Provides: group(distcc)
57 Provides: user(distcc)
58 Obsoletes: distcc < 2.1-2
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.
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.
73 Summary: inetd configs for distcc
74 Summary(pl.UTF-8): Pliki konfiguracyjne do użycia distcc poprzez inetd
76 Requires: %{name}-common = %{version}-%{release}
78 Obsoletes: distcc < 2.1-2
81 distcc configs for running from inetd.
83 %description inetd -l pl.UTF-8
84 Pliki konfiguracyjna distcc do startowania demona poprzez inetd.
87 Summary: Standalone daemon configs for distcc
88 Summary(pl.UTF-8): Pliki konfiguracyjne do startowania distcc w trybie standalone
90 Requires(post,preun): /sbin/chkconfig
91 Requires: %{name}-common = %{version}-%{release}
93 Obsoletes: distcc < 2.1-2
95 %description standalone
96 distcc configs for running as a standalone daemon.
98 %description standalone -l pl.UTF-8
99 Pliki konfiguracyjne distcc do startowania demona w trybie standalone.
102 Summary: Monitor for distcc
103 Summary(pl.UTF-8): Monitor dla distcc
109 %description monitor -l pl.UTF-8
112 %package monitor-gnome
113 Summary: GTK+ monitor for distcc
114 Summary(pl.UTF-8): Monitor GTK+ dla distcc
115 Group: X11/Applications
117 %description monitor-gnome
118 GTK+ monitor for distcc.
120 %description monitor-gnome -l pl.UTF-8
121 Monitor GTK+ dla distcc.
128 sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c
131 cp -f /usr/share/automake/config.* .
136 %{?with_gnome:--with-gnome}
141 rm -rf $RPM_BUILD_ROOT
142 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
143 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
146 DESTDIR=$RPM_BUILD_ROOT
148 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
149 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
150 install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
151 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
152 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
155 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
156 $RPM_BUILD_ROOT%{_desktopdir}
157 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
158 $RPM_BUILD_ROOT%{_pixmapsdir}
161 touch $RPM_BUILD_ROOT%{_var}/log/distcc
164 rm -rf $RPM_BUILD_ROOT
167 %groupadd -P %{name}-common -g 137 distcc
168 %useradd -P %{name}-common -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc
171 if [ "$1" = "0" ]; then
177 %service -q rc-inetd reload
180 if [ "$1" = 0 ]; then
181 %service -q rc-inetd reload
185 /sbin/chkconfig --add distcc
186 %service distcc restart "distcc daemon"
189 if [ "$1" = "0" ]; then
191 /sbin/chkconfig --del distcc
195 %defattr(644,root,root,755)
196 %doc AUTHORS NEWS README *.txt
197 %attr(755,root,root) %{_bindir}/%{name}
198 %{_mandir}/man?/%{name}.*
199 %attr(755,root,root) /etc/profile.d/*sh
202 %defattr(644,root,root,755)
203 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/distccd
204 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/distccd
205 %attr(755,root,root) %{_bindir}/%{name}d
206 %{_mandir}/man?/%{name}d.*
207 %attr(640,distcc,root) %ghost %{_var}/log/distcc
210 %defattr(644,root,root,755)
211 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/distccd
214 %defattr(644,root,root,755)
215 %attr(754,root,root) /etc/rc.d/init.d/distcc
218 %defattr(644,root,root,755)
219 %attr(755,root,root) %{_bindir}/distccmon-text
220 %{_mandir}/man1/distccmon-text.*
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_bindir}/distccmon-gnome
226 %{_desktopdir}/*.desktop