]> git.pld-linux.org Git - packages/distcc.git/blob - distcc.spec
9f0475d4116093906bcb19a34486f51aa912772d
[packages/distcc.git] / distcc.spec
1 #
2 # Conditional build:
3 %bcond_without  gnome   # build without gnome(monitor) support
4 #
5 Summary:        Program to distribute compilation of C or C++
6 Summary(pl):    Program do rozdzielania kompilacji programów w C lub C++
7 Name:           distcc
8 Group:          Development/Languages
9 Version:        2.18.3
10 Release:        1
11 License:        GPL
12 Source0:        http://distcc.samba.org/ftp/distcc/%{name}-%{version}.tar.bz2
13 # Source0-md5:  0d6b80a1efc3a3d816c4f4175f63eaa2
14 Source1:        %{name}.inetd
15 Source2:        %{name}.init
16 Source3:        %{name}.sh
17 Source4:        %{name}.csh
18 Source5:        %{name}.config
19 Source6:        %{name}.logrotate
20 Patch0:         %{name}-user.patch
21 URL:            http://distcc.samba.org/
22 BuildRequires:  autoconf >= 2.53
23 BuildRequires:  automake
24 %{?with_gnome:BuildRequires:    libgnomeui-devel >= 2.0}
25 BuildRequires:  pkgconfig
26 BuildRequires:  popt-devel
27 BuildRequires:  sed >= 4.0
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
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.
35
36 %description -l pl
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.
41
42 %package common
43 Summary:        Common files for inetd and standalone versions of distcc
44 Summary(pl):    Pliki wspólne dla wersji inetd i standalone distcc
45 Group:          Daemons
46 Requires:       gcc
47 Requires:       gcc-c++
48 Requires(pre):  /bin/id
49 Requires(pre):  /usr/bin/getgid
50 Requires(pre):  /usr/sbin/groupadd
51 Requires(pre):  /usr/sbin/useradd
52 Requires(postun):       /usr/sbin/groupdel
53 Requires(postun):       /usr/sbin/userdel
54 Provides:       group(distcc)
55 Provides:       user(distcc)
56 Obsoletes:      distcc < 2.1-2
57
58 %description common
59 distcc is a program to distribute compilation of C or C++ code across
60 several machines on a network. distcc should always generate the same
61 results as a local compile, is simple to install and use, and is often
62 two or more times faster than a local compile.
63
64 %description common -l pl
65 distcc jest programem pozwalaj±cym na dystrybucjê kompilacji C lub C++
66 na kilka maszyn w sieci. distcc powinien zawsze generowaæ takie same
67 rezultaty jak lokalna kompilacja, jest prosty w instalacji i u¿yciu
68 oraz bardzo czêsto dwa lub wiêcej razy szybszy ni¿ lokalna kompilacja.
69
70 %package inetd
71 Summary:        inetd configs for distcc
72 Summary(pl):    Pliki konfiguracyjne do u¿ycia distcc poprzez inetd
73 Group:          Daemons
74 PreReq:         %{name}-common = %{version}-%{release}
75 PreReq:         rc-inetd
76 Obsoletes:      distcc < 2.1-2
77
78 %description inetd
79 distcc configs for running from inetd.
80
81 %description inetd -l pl
82 Pliki konfiguracyjna distcc do startowania demona poprzez inetd.
83
84 %package standalone
85 Summary:        Standalone daemon configs for distcc
86 Summary(pl):    Pliki konfiguracyjne do startowania distcc w trybie standalone
87 Group:          Daemons
88 PreReq:         %{name}-common = %{version}-%{release}
89 PreReq:         rc-scripts
90 Requires(post,preun):   /sbin/chkconfig
91 Obsoletes:      distcc < 2.1-2
92
93 %description standalone
94 distcc configs for running as a standalone daemon.
95
96 %description standalone -l pl
97 Pliki konfiguracyjne distcc do startowania demona w trybie
98 standalone.
99
100 %package monitor
101 Summary:        Monitor for distcc
102 Summary(pl):    Monitor dla distcc
103 Group:          Applications
104
105 %description monitor
106 Monitor for distcc.
107
108 %description monitor -l pl
109 Monitor dla distcc.
110
111 %package monitor-gnome
112 Summary:        GTK+ monitor for distcc
113 Summary(pl):    Monitor GTK+ dla distcc
114 Group:          X11/Applications
115
116 %description monitor-gnome
117 GTK+ monitor for distcc.
118
119 %description monitor-gnome -l pl
120 Monitor GTK+ dla distcc.
121
122 %prep
123 %setup -q
124 %patch0 -p1
125
126 sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c
127
128 %build
129 cp -f /usr/share/automake/config.* .
130 %{__autoconf}
131 %{__autoheader}
132 %configure \
133         --enable-rfc2553 \
134         %{?with_gnome:--with-gnome} 
135
136 %{__make}
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
141         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
142
143 %{__make} install \
144         DESTDIR=$RPM_BUILD_ROOT
145
146 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
147 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
148 install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
149 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
150 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
151
152 %if %{with gnome}
153 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
154         $RPM_BUILD_ROOT%{_desktopdir}
155 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
156         $RPM_BUILD_ROOT%{_pixmapsdir}
157 %endif
158
159 touch $RPM_BUILD_ROOT%{_var}/log/distcc
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %pre common
165 if [ -n "`/usr/bin/getgid distcc`" ]; then
166         if [ "`/usr/bin/getgid distcc`" != "137" ]; then
167                 echo "Error: group distcc doesn't have gid=137. Correct this before installing distccd." 1>&2
168                 exit 1
169         fi
170 else
171         /usr/sbin/groupadd -g 137 distcc 1>&2
172 fi
173 if [ -n "`/bin/id -u distcc 2>/dev/null`" ]; then
174         if [ "`/bin/id -u distcc`" != "137" ]; then
175                 echo "Error: user distcc doesn't have uid=137. Correct this before installing distccd server." 1>&2
176                 exit 1
177         fi
178 else
179         /usr/sbin/useradd -u 137 -d /tmp -s /bin/false -c "distcc user" \
180                 -g distcc distcc 1>&2
181 fi
182
183 %postun common
184 if [ "$1" = "0" ]; then
185         %userremove distcc
186         %groupremove distcc
187 fi
188
189 %post inetd
190 if [ -f /var/lock/subsys/rc-inetd ]; then
191         /etc/rc.d/init.d/rc-inetd reload 1>&2
192 else
193         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
194 fi
195
196 %postun inetd
197 if [ -f /var/lock/subsys/rc-inetd ]; then
198         /etc/rc.d/init.d/rc-inetd reload
199 fi
200
201 %post standalone
202 /sbin/chkconfig --add distcc
203 if [ -f /var/lock/subsys/distccd ]; then
204         /etc/rc.d/init.d/distcc restart 1>&2
205 else
206         echo "Run \"/etc/rc.d/init.d/distcc start\" to start distcc daemon."
207 fi
208
209 %preun standalone
210 if [ "$1" = "0" ]; then
211         if [ -f /var/lock/subsys/distccd ]; then
212                 /etc/rc.d/init.d/distcc stop 1>&2
213         fi
214         /sbin/chkconfig --del distcc
215 fi
216
217 %files
218 %defattr(644,root,root,755)
219 %doc AUTHORS NEWS README *.txt
220 %attr(755,root,root) %{_bindir}/%{name}
221 %{_mandir}/man?/%{name}.*
222 %attr(755,root,root) /etc/profile.d/*sh
223
224 %files common
225 %defattr(644,root,root,755)
226 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/distccd
227 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/distccd
228 %attr(755,root,root) %{_bindir}/%{name}d
229 %{_mandir}/man?/%{name}d.*
230 %attr(640,distcc,root) %ghost %{_var}/log/distcc
231
232 %files inetd
233 %defattr(644,root,root,755)
234 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/distccd
235
236 %files standalone
237 %defattr(644,root,root,755)
238 %attr(754,root,root) /etc/rc.d/init.d/distcc
239
240 %files monitor
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_bindir}/distccmon-text
243 %{_mandir}/man1/distccmon-text.*
244
245 %if %{with gnome}
246 %files monitor-gnome
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/distccmon-gnome
249 %{_desktopdir}/*.desktop
250 %{_pixmapsdir}/*.png
251 %endif
This page took 0.107831 seconds and 3 git commands to generate.