3 %bcond_without gnome # build without gnome(monitor) support
5 Summary: Program to distribute compilation of C or C++
6 Summary(pl): Program do rozdzielania kompilacji programów w C lub C++
8 Group: Development/Languages
12 Source0: http://distcc.samba.org/ftp/distcc/%{name}-%{version}.tar.bz2
13 # Source0-md5: a55b547d4ff62d8500e290b82671db50
14 # Source0-size: 339939
15 Source1: %{name}.inetd
19 Source5: %{name}.config
20 Source6: %{name}.logrotate
21 Patch0: %{name}-user.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 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 distcc is a program to distribute compilation of C or C++ code across
32 several machines on a network. distcc should always generate the same
33 results as a local compile, is simple to install and use, and is often
34 two or more times faster than a local compile.
37 distcc jest programem pozwalaj±cym na dystrybucjê kompilacji C lub C++
38 na kilka maszyn w sieci. distcc powinien zawsze generowaæ takie same
39 rezultaty jak lokalna kompilacja, jest prosty w instalacji i u¿yciu
40 oraz bardzo czêsto dwa lub wiêcej razy szybszy ni¿ lokalna kompilacja.
43 Summary: Common files for inetd and standalone versions of distcc
44 Summary(pl): Pliki wspólne dla wersji inetd i standalone distcc
48 Requires(pre): /usr/sbin/useradd
49 Requires(postun): /usr/sbin/userdel
50 Obsoletes: distcc < 2.1-2
53 distcc is a program to distribute compilation of C or C++ code across
54 several machines on a network. distcc should always generate the same
55 results as a local compile, is simple to install and use, and is often
56 two or more times faster than a local compile.
58 %description common -l pl
59 distcc jest programem pozwalaj±cym na dystrybucjê kompilacji C lub C++
60 na kilka maszyn w sieci. distcc powinien zawsze generowaæ takie same
61 rezultaty jak lokalna kompilacja, jest prosty w instalacji i u¿yciu
62 oraz bardzo czêsto dwa lub wiêcej razy szybszy ni¿ lokalna kompilacja.
65 Summary: inetd configs for distcc
66 Summary(pl): Pliki konfiguracyjne do u¿ycia distcc poprzez inetd
68 PreReq: %{name}-common = %{version}-%{release}
70 Obsoletes: distcc < 2.1-2
73 distcc configs for running from inetd.
75 %description inetd -l pl
76 Pliki konfiguracyjna distcc do startowania demona poprzez inetd.
79 Summary: Standalone daemon configs for distcc
80 Summary(pl): Pliki konfiguracyjne do startowania distcc w trybie standalone
82 PreReq: %{name}-common = %{version}-%{release}
84 Obsoletes: distcc < 2.1-2
86 %description standalone
87 distcc configs for running as a standalone daemon.
89 %description standalone -l pl
90 Pliki konfiguracyjne distcc do startowania demona w trybie
94 Summary: Monitor for distcc
95 Summary(pl): Monitor dla distcc
101 %description monitor -l pl
104 %package monitor-gnome
105 Summary: gtk monitor for distcc
106 Summary(pl): Monitor gtk dla distcc
107 Group: X11/Applications
109 %description monitor-gnome
110 gtk monitor for distcc.
112 %description monitor-gnome -l pl
113 Monitor gtk dla distcc.
119 sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c
122 cp -f /usr/share/automake/config.* .
127 %{?with_gnome:--with-gnome}
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
134 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
137 DESTDIR=$RPM_BUILD_ROOT
139 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
140 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
141 install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
142 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
143 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
146 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
147 $RPM_BUILD_ROOT%{_desktopdir}
148 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
149 $RPM_BUILD_ROOT%{_pixmapsdir}
152 touch $RPM_BUILD_ROOT%{_var}/log/distcc
155 rm -rf $RPM_BUILD_ROOT
158 if [ -n "`getgid distcc`" ]; then
159 if [ "`getgid distcc`" != "137" ]; then
160 echo "Error: group distcc doesn't have gid=137. Correct this before installing distccd." 1>&2
164 /usr/sbin/groupadd -g 137 -r -f distcc
166 if [ -n "`/bin/id -u distcc 2>/dev/null`" ]; then
167 if [ "`/bin/id -u distcc`" != "137" ]; then
168 echo "Error: user distcc doesn't have uid=137. Correct this before installing distccd server." 1>&2
172 /usr/sbin/useradd -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc 1>&2
176 if [ "$1" = "0" ]; then
182 if [ -f /var/lock/subsys/rc-inetd ]; then
183 /etc/rc.d/init.d/rc-inetd reload 1>&2
185 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
189 if [ -f /var/lock/subsys/rc-inetd ]; then
190 /etc/rc.d/init.d/rc-inetd reload
194 /sbin/chkconfig --add distcc
195 if [ -f /var/lock/subsys/distccd ]; then
196 /etc/rc.d/init.d/distcc restart 1>&2
198 echo "Run \"/etc/rc.d/init.d/distcc start\" to start distcc daemon."
202 if [ "$1" = "0" ]; then
203 if [ -f /var/lock/subsys/distccd ]; then
204 /etc/rc.d/init.d/distcc stop 1>&2
206 /sbin/chkconfig --del distcc
210 %defattr(644,root,root,755)
211 %doc AUTHORS NEWS README *.txt
212 %attr(755,root,root) %{_bindir}/%{name}
213 %{_mandir}/man?/%{name}.*
214 %attr(755,root,root) /etc/profile.d/*sh
217 %defattr(644,root,root,755)
218 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/distccd
219 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/distccd
220 %attr(755,root,root) %{_bindir}/%{name}d
221 %{_mandir}/man?/%{name}d.*
222 %attr(640,distcc,root) %ghost %{_var}/log/distcc
225 %defattr(644,root,root,755)
226 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/distccd
229 %defattr(644,root,root,755)
230 %attr(754,root,root) /etc/rc.d/init.d/distcc
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_bindir}/distccmon-text
235 %{_mandir}/man1/distccmon-text.*
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_bindir}/distccmon-gnome
241 %{_desktopdir}/*.desktop